Routing: An upcoming change in RubyOnRails

On his weblog, David said that Routing is now in beta-gems.

The importance of this is that the next Rails upgrade here will break your applications, unless you either 1) tie your application to a specific gem version of Rails or 2) follow David’s RoR weblog closely for instructions on how to pre-emptively upgrade your applications.

Routing has some real advantages to it, one of which is that there’s about a 98% chance that Rails application hosting here will have a lighttpd-fastcgi offering (and be our the preferred way of hosting them) and anything to simplify the Rewrites situation helps.

To lock your rails app to a specific gem version, you can modify your config/environments.rb file {a disclaimer: this may be dated, but how I would do it in past versions of Rails—locked to 0.9.1 in this case}. Find

	

#Require Rails gems. require 'rubygems' require_gem 'activerecord' require_gem 'actionpack' require_gem 'actionmailer' require_gem 'rails'

Change it to the versions you are using, for example

	

#Require Rails gems. require 'rubygems' require_gem 'activerecord', '<= 1.30' require_gem 'actionpack', '<= 1.1.0' require_gem 'actionmailer', '<= 0.5.0' require_gem 'rails', '<= 0.9.1'

If you’re not sure about the version numbers, run gem list and take a look at the gem versions installed, and if you’ve never done anything like this to your application before than you are using the latest one.

·:· Posted 15 February 2005, 05:09 by Jason Hoffman to Scripting  |  

  1. Here’s what mine looks like, with the latest versions as of 2/15/05:

    # Require Rails gems.
    require ‘rubygems’
    require_gem ‘activerecord’, ‘

    Scott Hill    15 February 2005, 20:52    #
  2. Oops. It doesn’t like the quotes.

    Scott Hill    15 February 2005, 20:52    #