Upgrading To Rails 1.0rc2
In the past hours I have been upgrading my applications to the rails 1.0 release candidate that is available for several weeks already. Can you guess what the biggest bummer was?
No, it was not that my tests stopped working because the default settings foruse_transactional_fixtures and
use_instantiated_fixtures have been changed. That was
well documented and easy to fix.
And yes, I had to edit my environment files again, because they were replaced by new versions, but I was expecting this.
Another thing, was a change in the great prototype javascript library.
I was
using its extend function in my own javascript code and
the
calling convetion had been changed a bit. But that’s fine, hey, we
haven’t arrived at 1.0, yet.
However, when I deployed my application to the server, things went strange. Everything was really slow and most of the data was suddenly missing. I was panicking and looking at the database. You probably say: Dude, stay cool, it’s only rails running in development mode against your development database and you’re right. But why?
Finally, I realized I had rails allowed to overwrite my ”.htaccess” file but didn’t look at the changes. And there it was: Rails was running in CGI mode, instead of Fast-CGI. That’s why it didn’t pick up the environment setting for production mode and why everything was so slow. D’oh!
Now, everything is running nicely again. Time to get some sleep, I guess. So, don’t be afraid of upgrading rails. It usually works really well, as long as you’re just a bit smarter than I was…