我是 Spree 和 Rails 的新手,一直在遵循关于 spree commerce 的开发人员指南 ( http://guides.spreecommerce.com/developer/extensions_tutorial.html ) 来构建新的扩展,但没有成功。
当我在我的 Spree 扩展总监中执行以下操作时,
rails g migration add_sale_price_to_spree_variants sale_price:decimal
我明白了
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/acts_as_list-0.2.0/lib/acts
_as_list.rb:18:in `insert': uninitialized constant ActiveRecord::Base (NameError
)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/acts_as_list-0
.2.0/lib/acts_as_list.rb:24:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:64:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:64:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/spree_core-2.0
.4/lib/spree/core.rb:3:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:116:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:116:in `rescue in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:122:in `require'
from C:/Sites/spree_layered_pricing/lib/spree_layered_pricing/engine.rb:
3:in `<class:Engine>'
from C:/Sites/spree_layered_pricing/lib/spree_layered_pricing/engine.rb:
2:in `<module:SpreeLayeredPricing>'
from C:/Sites/spree_layered_pricing/lib/spree_layered_pricing/engine.rb:
1:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:112:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:112:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
4/lib/rails/engine/commands.rb:13:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:64:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:64:in `require'
from script/rails:7:in `<main>'
有没有解决的办法?我错过了什么?