Freeze !!!
Dreamhost was initially having rails 1.0. Varcasa was running happily. Suddenly one day, Varcasa was broken. It was wierd, it was working in my laptop. I was not able to recreate the problem in my laptop. Then I found out that dreamhost have updated their rails to 1.1 version. So I updated rails in my laptop and was able to create the problem. Then went thru all the steps of upgrading to Rails 1.1.
I realised that this is going to be a chronic problem. I was pissed off that I have to know follow what version of Rails Dreamhost is running. I know that rails community cant be that stupid, so I started searching in web. Then I found out about freeze rails functionality.
It is so easy.
rake freeze_rails command will copy the current rails version in your machine to vendor/rails folder. When application starts it will first look at vendor/rails folder to load rails. So using freeze_rails we do not have to worry whether the host company will update rails version and break our application.
UPDATED: rake freeze_rails won't work from Rails 1.1.2. Use rake rails:freeze:gems instead
More info,
I realised that this is going to be a chronic problem. I was pissed off that I have to know follow what version of Rails Dreamhost is running. I know that rails community cant be that stupid, so I started searching in web. Then I found out about freeze rails functionality.
It is so easy.
rake freeze_rails command will copy the current rails version in your machine to vendor/rails folder. When application starts it will first look at vendor/rails folder to load rails. So using freeze_rails we do not have to worry whether the host company will update rails version and break our application.
UPDATED: rake freeze_rails won't work from Rails 1.1.2. Use rake rails:freeze:gems instead
More info,

0 Comments:
Post a Comment
<< Home