0
votes

I am a new to working with Spree and basically did the following:

git cloned the git hub repo and created a new project. I then looked in the core folder and took all the files I needed. The reason why I did this is purely because I wish to customise Spree and make some changes. I did a bundle install and tried doing a bundle exec rake db:reset and ran into an error that I have been trying to solve. I have looked in the following file

--> /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/spree_auth 1.1.0/app/controllers/spree/admin/admin_users_controller_decorator.rb which looks like the following: Pastie. I also found the following github issue github issue that Ryan Biggs commented on. I tried this but had no luck.

What is it that I have done wrong here.

uninitialized constant Spree::User::DestroyWithOrdersError /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/spree_auth-1.1.0/app/controllers/spree/admin/admin_users_controller_decorator.rb:3:in

block in <top (required)>' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/spree_auth-1.1.0/app/controllers/spree/admin/admin_users_controller_decorator.rb:2:in class_eval' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/spree_auth-1.1.0/app/controllers/spree/admin/admin_users_controller_decorator.rb:2:in <top (required)>' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/spree_auth-1.1.0/lib/spree/auth/engine.rb:13:in block in activate' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/spree_auth-1.1.0/lib/spree/auth/engine.rb:12:in glob' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/spree_auth-1.1.0/lib/spree/auth/engine.rb:12:in activate' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:451:in _run__1016855746__prepare__693579178__callbacks' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in __run_callback' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in _run_prepare_callbacks' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in run_callbacks' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.2.3/lib/action_dispatch/middleware/reloader.rb:74:in prepare!' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.2.3/lib/action_dispatch/middleware/reloader.rb:48:in prepare!' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/application/finisher.rb:47:in block in <module:Finisher>' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/initializable.rb:30:in instance_exec' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/initializable.rb:30:in run' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/initializable.rb:55:in block in run_initializers' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/initializable.rb:54:in each' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/initializable.rb:54:in run_initializers' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/application.rb:136:in initialize!' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:inmethod_missing' /home/dj/Desktop/my_store/config/environment.rb:5:in <top (required)>' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/application.rb:103:in require_environment!' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/application.rb:292:in block (2 levels) in initialize_tasks' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in call' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in block in execute' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in each' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in execute' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in block in invoke_with_call_chain' /home/dj/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in mon_synchronize' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:176:in block in invoke_prerequisites' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:174:in each' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:174:in invoke_prerequisites' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:157:in block in invoke_with_call_chain' /home/dj/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in mon_synchronize' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in invoke' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in invoke_task' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in block (2 levels) in top_level' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in each' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in block in top_level' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:in top_level' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in block in run' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in run' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in <top (required)>' /home/dj/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in load' /home/dj/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `' Tasks: TOP => db:reset => environment

1

1 Answers

2
votes

Djj,

The recommended method for installing Spree is:

$ gem install rails -v 3.2.3
$ gem install spree
$ rails new my_store
$ spree install my_store

You don't want to copy files directly into your app. http://guides.spreecommerce.com/customization.html has some good resources on customizing your site.

http://speakerdeck.com/u/jsqu99/p/spreeconf-2012-introducing-spree-10 has a good explanation of how a Spree app should be structured.