0

我是与 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: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: 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: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 阻止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:invoke_with_call_chain'/home/dj/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201 invoke_prerequisites' /home/dj/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:157:in 中的块: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 `' 任务:TOP => db :reset => 环境

4

1 回答 1

2

DJ,

安装 Spree 的推荐方法是:

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

您不想将文件直接复制到您的应用程序中。http://guides.spreecommerce.com/customization.html有一些很好的资源来定制您的网站。

http://speakerdeck.com/u/jsqu99/p/spreeconf-2012-introducing-spree-10很好地解释了 Spree 应用程序的结构。

于 2012-05-14T23:19:47.640 回答