vishB
vishB

Reputation: 1688

Spree Extension Scaffold

I have created a a spree application and used one existing extension spree_news by cloning it to my spree application folder, now when i try to create a scaffold or a resource inside the spree_news extension by trying:

wapnil@swapnil-pc:~/ecommerce/spree_news$ rails generate scaffold oerp Pname:string Pdesc:text Pprice:float

the following error is encountered:

/home/swapnil/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': cannot load such file -- rails/engine/commands (LoadError)
    from /home/swapnil/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
    from script/rails:8:in `<main>'

Please Help!!

Upvotes: 0

Views: 327

Answers (1)

Ryan Bigg
Ryan Bigg

Reputation: 107728

The script/rails file in your extension is wrong and should be this. This is due to a bug in Spree that will be fixed in the next release.

Upvotes: 4

Related Questions