执行步骤 5.7时我遇到了一个问题。在我的扩展中没有遇到路径:
#lib/spree/flag_promotion_configuration.rb.
我必须创建目录'spree'并在创建文件'flag_promotion_configuration.rb'之后?
如果我把它写在文件中,按照教程的要求:
#lib/spree_flag_promotions/engine.rb
module Spree::ActiveShipping; end
....
module SpreeFlagPromotions
class Engine < Rails::Engine
initializer "spree.flag_promotions.preferences", :after => "spree.environment" do |app|
Spree::FlagPromotions::Config = Spree::FlagPromotionConfiguration.new
end
....
end
end
我执行了:
$ rake db:migrate
返回此错误:
rake aborted!
uninitialized constant Spree::FlagPromotions
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
我相信这与以下内容有关:
#lib/spree/flag_promotion_configuration.rb.
因为他们不知道创建此文件的位置或位置。