no such file to load -- "tasks/rails" + rails2 to rails3
I have upgraded rails 2.3.11 to rails 3.0.8 using rails_upgrade plugin. Now I am getting this error and I do not understand开发者_运维百科 why. Any help you can provide is appreciated!
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>'
Check your RakeFile
to make sure it doesn't have the old Rails 2 artifacts left in it. The error is getting thrown in the RakeFile
so that's probably the cause and the upgrade plugin would not have caught that.
Here is what a sample Rails 3 RakeFile
looks like:
# 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
精彩评论