2011-08-01 138 views
1

我已經使用rails_upgrade插件將rails 2.3.11升級到rails 3.0.8。現在我收到這個錯誤,我不明白爲什麼。您可以提供的任何幫助表示讚賞!no file to load - 「tasks/rails」+ rails2 to rails3

rake aborted! 
no such file to load -- tasks/rails 
/home/mpn/mpn_admin/branches/to_rails3/Rakefile:13:in `require' 
/home/mpn/mpn_admin/branches/to_rails3/Rakefile:13:in `<top (required)>' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:59:in `run' 
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/bin/rake:32:in `<top (required)>' 
/usr/local/rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load' 
/usr/local/rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>' 

回答

4

檢查RakeFile,以確保它沒有老梁2級的文物留在這。錯誤是在RakeFile中引起的,所以這可能是原因,升級插件不會發現。

這裏是什麼樣的Rails 3 RakeFile樣子:

# 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__) 
require 'rake' 

MyAppNameGoesHere::Application.load_tasks 
相關問題