An entity composed of reality and pseudo-reality. Enjoys coding, news, history, photography.
A bit of Ruby, a bit of JavaScript, a bit of love...
I was upgrading a Rails 1.2.3 app to Rails 2.3.3 and I thought about documenting what I had to do for future reference. I was following Peter Marklund's article to upgrade to Rails 2.3.2 which I also followed to upgrade. However, I want to cover the many little things that will make your app not work in 2.3.
Upgrading to Rails 2.3.2 should be straightforward.
RAILS_GEM_VERSION = '2.3.3' unless defined? RAILS_GEM_VERSION
rake rails:freeze:edge RELEASE=2.3.3and
rake rails:update. This should place a new version of rails. From here on follow Marklund's article to finish off the rest of the solution.
The main differences between Rails 1.2 and 2 are the many deprecated calls that need to be addressed. Here knowing sed is a godsend. A command like the following
find app/ -exec sed -i '' 's/A/B/g' {} \; -print
where A is the search and B is the replace works wonders.
Here are some common changes that need to be addressed in transitioning and need to be replaced for your app to work.
s/@request/request/g s/redirect_to_url/redirect_to/g s/find_first/first/g s/find_all/all/g
Comments 0 Comments