Skip to content

How to upgrade to Ruby on Rails 2.0

by andy on December 10th, 2007

I wanted to upgrade on project of mine to Ruby on Rails 2.0 to automatically get some security and performance upgrades. So how to do it? My first try was:

  1. checkout a new copy of my project from the SCM
  2. upgrade the used rails version to EdgeRails
    (through executing “rake rails:freeze:edge” twice)
  3. adopted the RAILS_VERSION variable in config/environment.rb
  4. Got a “500 Internal Error” without any usable logging information on starting the Rails server (“script/server“)

So what? I upgraded everything as planned and got an error without any real debugging help. What to do now?

After some googling around I found Mislav Marohnic’s excellent r2check.rb script. Just run it in your Rails directory and it will report a lot of errors and deprecated features that might hit you. One of those reported errors was the new notation for singular resources, after it converted my resources.rb the application finally started (albeit I had to fix some errors in the restful_authentication plugin, but nothing to heavy). So now I’m running Rails 2.0.1 and some pages really fell a lot faster.

Thank you very much for that script!

  • Stumbleupon
  • Delicious
  • Google Buzz

No related posts.

One Comment
  1. Glad that it helped ;)

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS