Today I attempted to upgrade a Rails app from 2.3.5 to 3.0.beta. I assumed this might be a monumental undertaking, and was prepared to cut things short if needed.
The bad news is that I did stop half way through, and have reverted to 2.3.5. The good news is the basic upgrade path was easier than I expected.
There’s now an official upgrade plugin which you can install into your existing Rails 2.x app that provides a number of rake tasks that help you determine what’s going to change, and provide code so you can make it happen:
http://github.com/rails/rails_upgrade
Jeremy McAnally, the creator of the plugin, also has a nice tutorial on getting Rails 3 beta installed on your system:
http://omgbloglol.com/post/371893012/the-path-to-rails-3-greenfielding-new-apps-with-the
Once Rails 3 is on your system, and you’re ready for the upgrade, it’s as simple as doing
$ cd myapp
$ rails .
After updating all my config files with proper database settings and the like, I fired up the server and found to my delight that everything seemed to work, including my Metal classes.
I then moved on to getting my RSpec testing suite working, and that’s when I ran into problems. After tinkering around for a while attempting to install the alpha of RSpec 2, I realized that rspec and rspec-rails are a bit far off from being ready for Rails 3. Since testing is intregal to my development, it was a no go for an upgrade. :(
So it seems that once the community has time to update gems and plugins for Rails 3, things will be looking good. Personally, I can’t wait to take advantage of all the Rails 3 has to offer.