A Fresh Cup is Mike Gunderloy's software development weblog, covering Ruby on Rails and whatever else I find interesting in the universe of software. I'm a full-time software developer: most of my time in recent years has been spent writing Rails, though I've dabbled in many other things and like most people who have been writing code for decades I can learn new stuff as needed.

Currently I'm unemployed and starting to look around for my next opportunity as a senior manager, team lead, or lead developer. Drop me a comment if you're interested or email MikeG1 [at] larkfarm.com.

« Double Shot #334 | Main | Double Shot #333 »

Rails 2.x: The Death of Application.rb

Here's a commit message that showed up in the main Rails repository earlier today:

BACKWARDS INCOMPATIBLE: 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 [DHH]

Well, getting rid of special casing is great, and this commit does indeed simplify some of the Rails internals a bit. But I can hear some of my readers cursing: this seems like an arbitrary change just when Rails 2.2 is about to come out.

Fortunately, if you're moving to Rails 2.2, this won't affect you (yet). We're close enough to 2.2 final that the main repository has been branched: there's now a 2.2 stable branch (which is currently accepting very few bug fixes) and a master branch that's targeted at Rails 2.3, or perhaps Rails 3.0. This change - and some other big changes that have been committed over the past few days - is on the master branch.

So, for Rails 2.2, don't panic. On the other hand, if you're tracking edge Rails closely, the next few weeks are likely to be a time of vast change (and instability) as some pent-up major changes hit the repository. Be sure you know what you're cloning before you set up a new Rails application.

Reader Comments (2)


It always annoys me that it wasn't named properly, when trying to find it using "Find In Project" in Textmate

November 18, 2008 | Unregistered CommenterMorgan Roderick

As a transitional measure, to run Rails 2.2 and 2.3 on the same codebase, you can:
1) Move application.rb to application_controller.rb, and
2) Create a new application.rb with the following code:
require_dependency 'application_controller'

November 16, 2009 | Unregistered CommenterBrian

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>