6

我使用的是 rake 10.0.4 并且我已经升级到 10.1.0,但是现在当我部署到我的登台服务器时,它抛出了我:

rake aborted!
undefined method `push' for LL("db"):Rake::Scope
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank/dsl.rb:11:in `override_task'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/tasks/seed.rake:42:in `block in <top (required)>'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/tasks/seed.rake:1:in `<top (required)>'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank.rb:19:in `block in load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank.rb:19:in `each'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank.rb:19:in `load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank/railtie.rb:9:in `block in <class:Railtie>'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `instance_exec'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `block in load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `each'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/engine.rb:423:in `block in load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/application/railties.rb:8:in `each'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/application/railties.rb:8:in `all'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/engine.rb:423:in `load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/application.rb:145:in `load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/alter/workspace/MyApp/Rakefile:7:in `<top (required)>'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/bin/ruby_noexec_wrapper:14:in `eval'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

我的 Rakefile 没有什么特别之处:

#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

MyApp::Application.load_tasks

如果我再次降级到 10.0.4,它工作正常。有什么线索吗?

4

1 回答 1

5

这是种子库 gem 的一个已知问题。最新版本的种子库(0.2.1)仍然存在问题,因此种子库问题中的建议是在您的Gemfile中使用来自 github 的版本:

gem 'seedbank', github: 'james2m/seedbank'
于 2013-07-01T16:16:34.913 回答