High Tech Sorcery

upgrade a rails app from rails 2 to rails 3

by on Apr.24, 2011, under Ruby On Rails

Just a few notes on a recent upgrade with a rails project that was fairly young thus did not have a lot of issues moving to rails 3.

  • script/plugin install git://github.com/rails/rails_upgrade.git
  • rails:upgrade:backup
  • rake rails:upgrade:routes >> config/routes.rb
    • edit file removing everything before the  ”Application.routes.draw” line
  • rake rails:upgrade:gems > Gemfile
    • edit Gemfile to remove top line
  • rake rails:upgrade:configuration > config/application.rb
    • edit application.rb and remove top line
  • rails new .
    • since this was a relatively young application I was able to overwrite everything but:
      • Gemfile
      • application_controller.rb
      • application_helper.rb
      • app/views/layouts/application.html.erb
      • config/routes.rb
      • config/locales/en.yml
      • config/database.yml
      • db/seeds.rb
      • public/javascripts/application.js

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...