Rake db:migrate返回“rake aborted!没有这样的文件加载 - 规范”

时间:2010-12-26 00:14:02

标签: ruby-on-rails migration rake

出于某种原因,在没有的地方,rails开始给我一个关于“rake db:migrate”的错误,而我无法再运行迁移。它返回错误“没有这样的文件加载 - spec / home / ti / rails_apps / appname / Rakefile:10”

我花了两个小时搜索谷歌寻找答案,试图解决这个问题,但无济于事。可能是什么问题?

这是跟踪:

-jailshell-3.2$ rake db:migrate --trace
(in /home/ti/rails_apps/teamisrael)
rake aborted!
no such file to load -- spec
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
/home/ti/rails_apps/teamisrael/vendor/plugins/google-geocoder/tasks/rspec.rake:5
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:145:in `load'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:7
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:7:in `each'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/tasks/rails.rb:7
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/home/ti/rails_apps/teamisrael/Rakefile:10
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2349:in `load'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2349:in `raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1985:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1984:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1969:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

2 个答案:

答案 0 :(得分:0)

也许你的google-geocoder插件rake任务需要你没有的东西?

/home/ti/rails_apps/teamisrael/vendor/plugins/google-geocoder/tasks/rspec.rake:5

答案 1 :(得分:0)

在堆栈跟踪中看起来google-geocoder插件需要较旧版本的RSpec。