Migrating Your Rails App From v1.2.3 to v1.2.4

Posted by Scott on Oct 11th, 2007

The Ruby on Rails crew has stamped the final release of the v1.2 series of Rails. Go get it with your standard gem update command. They did a good job this time keeping changes within the gem itself. If you want your existing v1.2.3 app to use the same code base as a fresh v1.2.4 app, you only need to make the following changes:

config/boot.rb:

Remove the following code from the top of the file (sorry, the indenting is off in this post due to WordPress issues with the <code> tags):

unless defined?(RAILS_ROOT)
root_path = File.join(File.dirname(__FILE__), '..')

unless RUBY_PLATFORM =~ /(:?mswin|mingw)/
require 'pathname'
root_path = Pathname.new(root_path).cleanpath(true).to_s
end

RAILS_ROOT = root_path
end

And in its place add the following code snippet:

RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)

Finally, just update the RAILS_GEM_VERSION constant in your config/environment.rb to ‘1.2.4’ – that’s it.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Blog Badges



[FSF Associate Member]

Archives