Mar 11 2009

Things to watch out for in Rails 2.3

Recently I was asked on IRC what are the main traps if you want to migrate your application to Rails 2.3.

(NOTE: At the time when I’m writing, Rails 2.3.1 is available which is actually Rails 2.3 RC2. This is a release candidate beta, so even if it is fairly stable, you need to consider using it in production environment or not.)

I am going to collect the list of changes to watch out for with Rails 2.3:

1: Renamed Application Controller

If you have and old Rails project and you are already using Rails 2.3, you may encounter the following problem when you are loading up your console:

$ script/server
Loading development environment (Rails 2.3.1)
/opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/activesupport-2.3.1/lib/active_support/dependencies.rb:443:in `load_missing_constant':NameError: uninitialized constant ApplicationController

This is because DHH introduced a backwards incompatible change with the Application Controller. He renamed application.rb to application_controller.rb and removed all the special casing that was in place to support the former. You must do this rename in your own application when you upgrade to this version.

Another NOTE: Please do me a favor and leave your comments if you encounter other non-obvious changes while you’re working with Rails 2.3.


Mar 4 2009

The Rails Magazine

There are a lot of really great resources about Ruby and Rails on the web but the community was missing resource and articles an offline. In print. In something what you can hold in your hands and read on the tube/plane or wherever you want without the need of a computer.

Until now. The first issue of the Rails Magazine (titled ‘The Beginning’) is out now. Rails Magazine is a real, printed journal covering Rails and the Rails community. Continue reading