How to upgrade to Ruby on Rails 2.0
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:
- checkout a new copy of my project from the SCM
- upgrade the used rails version to EdgeRails
(through executing “rake rails:freeze:edge” twice) - adopted the RAILS_VERSION variable in config/environment.rb
- 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!
No related posts.



Glad that it helped ;)