Saturday, October 13, 2007

Migration : Upgrading Rails from 1.2.3 to 1.2.5

Being adventurous having my first Rails appplication in production since August 2007, I read about the impending Rails 2.0 release. As I understand it, there was to be a 1.2.4 release and it was supposed to be mostly made up of security fixes and deprecation notices that will help you prepare for Rails 2.0.

Being cautious, I froze Rails 1.2.3 into the Vendor Directory using rake:freeze:gems.

Then I gem install rails --include-dependencies

Surprise...Surprise, the update is to Rails 1.2.5 !

D:\Aptana_Workspace\crm4web>gem install rails --include-dependencies
Need to update 22 gems from http://gems.rubyforge.org
......................
complete
Successfully installed rails-1.2.5
Successfully installed activesupport-1.4.4
Successfully installed activerecord-1.15.5
Successfully installed actionpack-1.13.5
Successfully installed actionmailer-1.3.5
Successfully installed actionwebservice-1.2.5
Installing ri documentation for activesupport-1.4.4...
Installing ri documentation for activerecord-1.15.5...
Installing ri documentation for actionpack-1.13.5...
Installing ri documentation for actionmailer-1.3.5...
Installing ri documentation for actionwebservice-1.2.5...
Installing RDoc documentation for activesupport-1.4.4...
Installing RDoc documentation for activerecord-1.15.5...
Installing RDoc documentation for actionpack-1.13.5...
Installing RDoc documentation for actionmailer-1.3.5...
Installing RDoc documentation for actionwebservice-1.2.5...

Result :
Tested on a blank project (Radrails+Windows 2003 server) created using Rails 1.2.3
Can display the Std index.htm but on clicking the "About Your Application's Environment", the following error message was shown

"Routing Error, no route found to match /rails/info/properties with (:method :Get)

I then created a new project under Rails 1.25 and on clicking the "About Your Application's Environment"

About your application’s environment
Ruby version 1.8.6 (i386-mswin32)
RubyGems version 0.9.2
Rails version 1.2.5
Active Record version 1.15.5
Action Pack version 1.13.5
Action Web Service version 1.2.5
Action Mailer version 1.3.5
Active Support version 1.4.4
Application root D:/Aptana_Workspace/test-125
Environment development
Database adapter mysql

Worried about the impact on my Production Apps, I committed to SVN, unfroze and ran the app under Rails 1.2.5 and voila no problems :-)

BTW, I was just just informed of this link :-
http://weblog.rubyonrails.org/2007/10/12/rails-1-2-5-maintenance-release

which recommends as follows :-

To upgrade, `
gem install rails`,
set RAILS_GEM_VERSION to ‘1.2.5’ in config/environment.rb, and
`rake rails:update:configs`.

Updated on 18th October 2007

An example of a deprecation woud be
record_type => record.type.name

which will genenerate a
warning: Object#type is deprecated; use Object#class

Solution : record_type => record.class.name

No comments:

Welcome to Rails.. Rails... Rails !

In 1995, I started the popular Clipper...Clipper... Clipper website (no blogs then) which was very popular and linked by virtually every Clipper-related site. When I switched to Windows via Delphi in 1997, I started the Delphi... Delphi... Delphi site. In June 2007, I discovered Ruby on Rails and no prize for guessing what I am gonna name this blog. which I started on 2nd October 2007.

As at 10th June 2010, we have 13,364 unique visitors from more than 84 countries such as Angola, Andorra, Argentina, Australia, Austria, Algeria,Barbados, Bosnia and Herzogovina, Belgium, Brazil, Bulgaria, Bangladesh, Belarus, Bolivia, Chile, Cambodia, Cape Vede, Canada, China, Colombia, Costa Rica, Croatia, Cyprus, Czech Republic, Denmark, Egypt, Estonia, Finland, France, Guadeloupe, Guatemala, Germany, Greece, Hong Kong, Hungary, India, Indonesia, Ireland, Israel, Italy, Japan, Kenya, Korea, Lithuania, Latvia, Malaysia, Mexico, Macao, Netherlands, Nepal, Norway, New Zealand, Oman, Panama, Peru, Poland, Portugal,Paraguay , Philippines, Romania, Russian Federation, Saudi Arabia, Singapore, Spain, Slovakia, Slovenia, Serbia, South Korea, Slovenia, South Africa, Spain, Switzerland, Sri Lanka, Sweden, Taiwan, Thailand, Turkey, United Arab Emirates, Ukraine, USA, UK, Venezuela, Vietnam

CCH
10th June 2010, 19:42