ruby on rails - Spree - Generator command -


i new spree , rails , have been following developer guide (http://guides.spreecommerce.com/developer/extensions_tutorial.html) on spree commerce build new extension, no success.

when following in spree extension director,

rails g migration add_sale_price_to_spree_variants sale_price:decimal 

i

    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 )         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)>'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:64:in `require'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:64:in `require'         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)>'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:116:in `require'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:116:in `rescue in require'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:122:in `require'         c:/sites/spree_layered_pricing/lib/spree_layered_pricing/engine.rb: 3:in `<class:engine>'         c:/sites/spree_layered_pricing/lib/spree_layered_pricing/engine.rb: 2:in `<module:spreelayeredpricing>'         c:/sites/spree_layered_pricing/lib/spree_layered_pricing/engine.rb: 1:in `<top (required)>'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:112:in `require'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:112:in `require'         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)>'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:64:in `require'         c:/railsinstaller/ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ ext/kernel_require.rb:64:in `require'         script/rails:7:in `<main>' 

is there way around this? missing out on ?

in documentation referring to, blow migration example, say

todo: make above generator work in extension directories

have tried using different name, use code provide?

class addsalepricetospreevariants < activerecord::migration   def change     add_column :spree_variants, :sale_price, :decimal, :precision => 8, :scale => 2   end end  

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -