我是与 Spree 合作的新手,基本上做了以下工作:
git 克隆了 git hub 存储库并创建了一个新项目。然后我查看了核心文件夹并获取了我需要的所有文件。我这样做的原因纯粹是因为我希望自定义 Spree 并进行一些更改。我进行了捆绑安装并尝试执行捆绑执行 rake db:reset 并遇到了我一直试图解决的错误。我查看了以下文件
--> /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/spree_auth 1.1.0/app/controllers/spree/admin/admin_users_controller_decorator.rb
如下所示:Pastie。我还发现了Ryan Biggs 评论过的以下 github issue github issue 。我试过这个,但没有运气。
我在这里做错了什么。
未初始化常量 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:inglob' /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:prepare!' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.2.3/lib/action_dispatch/middleware/reloader.rb:48:in
准备中!/home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/application/finisher.rb:47:inblock 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:inrun' /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:ineach' /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:ininitialize!' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in
method_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:inblock (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:inblock 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:inexecute' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in
阻止invoke_with_call_chain' /home/dj/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:inmon_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:inblock 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:invoke_with_call_chain'/home/dj/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201invoke_prerequisites' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:157:in
中的块:inmon_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:ininvoke' /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:inblock (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:inblock 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:intop_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:instandard_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 `' 任务:TOP => db :reset => 环境