0

私は 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>'

これを回避する方法はありますか?私は何を見逃していますか?

4

1 に答える 1