1

我正在使用 rails 2.3.5 , ruby​​ 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

我在windows机器上,

该项目没有 .gem 文件,所以我使用 rake gems:install 和 rake db:create

到上述步骤一切正常,但是

当我运行rake db:migrate --trace时,出现以下错误

** Execute environment
rake aborted!
no such file to load -- rush
D:/programfiles/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
D:/programfiles/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:156:in `require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:521:in `new_constants_in'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:156:in `require'
D:/workspace/ruby/education/fedena2.3inprogress/vendor/plugins/delayed_job/lib/d
elayed/worker.rb:1
D:/programfiles/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
D:/programfiles/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:156:in `require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:521:in `new_constants_in'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:156:in `require'
D:/workspace/ruby/education/fedena2.3inprogress/vendor/plugins/delayed_job/lib/d
elayed_job.rb:6
D:/programfiles/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
D:/programfiles/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:156:in `require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:521:in `new_constants_in'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:156:in `require'
D:/workspace/ruby/education/fedena2.3inprogress/vendor/plugins/delayed_job/init.
rb:1:in `evaluate_init_rb'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:1
58:in `evaluate_init_rb'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/core_ext/kernel/reporting.rb:11:in `silence_warnings'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:1
54:in `evaluate_init_rb'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:4
8:in `load'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/load
er.rb:38:in `load_plugins'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/load
er.rb:37:in `each'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/load
er.rb:37:in `load_plugins'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:36
9:in `load_plugins'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:16
5:in `process'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:11
3:in `send'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:11
3:in `run'
D:/workspace/ruby/education/fedena2.3inprogress/config/environment.rb:6
D:/programfiles/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
D:/programfiles/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:156:in `require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:521:in `new_constants_in'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_su
pport/dependencies.rb:156:in `require'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/misc.rake:4

D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205
:in `call'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205
:in `execute'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200
:in `each'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200
:in `execute'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158
:in `invoke_with_call_chain'
D:/programfiles/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151
:in `invoke_with_call_chain'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:176
:in `invoke_prerequisites'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174
:in `each'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174
:in `invoke_prerequisites'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:157
:in `invoke_with_call_chain'
D:/programfiles/Ruby187/lib/ruby/1.8/monitor.rb:242:in `synchronize'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151
:in `invoke_with_call_chain'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144
:in `invoke'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:116:in `invoke_task'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:94:in `top_level'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:94:in `each'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:94:in `top_level'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:133:in `standard_exception_handling'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:88:in `top_level'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:66:in `run'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:133:in `standard_exception_handling'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application
.rb:63:in `run'
D:/programfiles/Ruby187/lib/ruby/gems/1.8/gems/rake-0.9.2.2/bin/rake:33
D:/programfiles/Ruby187/bin/rake:19:in `load'
D:/programfiles/Ruby187/bin/rake:19
Tasks: TOP => db:migrate => environment
4

1 回答 1

4

似乎您的应用程序需要缺少 gem rush[http://rubygems.org/gems/rush]。按照 url 安装它,然后重试。

是的,bundle install应该确保在您的系统中安装所有必需的 gem。

gem install rush, 工作或将 gem rush 添加到您的 gem 文件中,然后运行 ​​bundle install (如果您使用 bundler)

于 2012-08-24T07:37:26.697 回答