Saturday, December 8, 2007

Rails 2.0

I spent some time today to convert all my on-going projects to Rails 2.0. Not a huge effort, but here are my notes.

My first problem was getting "gem install rails" to upgrade smoothly. It appears that the rails team noticed the problem and quickly put up version 2.0.1, but it also failed. A quick google search pointed me to a Polish site that had what looked like a solution. A few modifications and I was ready to go. The highlights are...
svn co rails-2.0.1

cd rails-2.0.1

for f in *
[ -d $f/pkg ] && { cd $f ; rake package ; cd .. }

for f in */pkg/*.gem

sudo gem install $f --local

With the six gems now freshly compiled I put them into a tarball and moved them to a distribution point. Then I wrote a short script to untar and install locally (sandbox/rails/ That made it easy to update all of my machines, including slicehost. (I did have a problem on one of my older machines. I had to modify the script to load the gems one at a time).

Next were the tests. I was able to get all projects to test without errors. I created a small demo project to make sure that was working as well.

Happy rails 2.0.1!

No comments: