Wednesday, April 4, 2012

Upgrading from Rails 2.1.x to Rails 2.3.11

by sandipransing 0 comments
If your application is currently on any version of Rails 2.1.x, The following changes needs to be done for upgrading your application to Rails 2.3.11

1. First install Rails version 2.3.11

gem install rails -v2.3.11


2. Freeze app ruby gems

rake rails:freeze:gems

Hopefully it should work for you but it gave me following error

undefined method `manage_gems' for Gem:Module


3. Create sample rails 2.3.11 app

rails _2.3.11_ testsapp


Now, Copy all missing "config/initializers/*" files from new "testapp to the application that to be upgraded.

cp testapp/config/initializers/* config/initializers


4. Change Rails version inside environment.rb to Rails 2.3.11

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.11'


5. Rename app/controllers/application.rb file to app/controllers/application_controller.rb

OR


rails:update:application_controller


6. Start rails server and fix the issues one by one.

ruby script/server
Read More…

About The Author

Sandip is a ruby on rails developer based in pune and also a blogger at funonrails. Opensource contributor and working with Josh software Private Limited. for more info read Follow Sandip on Twitter for updates.

Connect With Me...

Github Projects

@sandipransing Twitter