Wednesday 1 April 2009

Rails 2.0 -> 2.3.2 Upgrade

General the upgrade was not a major problems most of the application work. Have about 25 or 2500 tests failing, mainly with stale record on delete for lots of controller and unit tests of destroying object. The main issues where as follows:-

Cleanup

Had a few problems with plugins causing problems after update of rails:-
  • plugin/engines needed to be deleted,now part of rails
  • plugin/arts needed to be deleted
Also had a few renames of Dependencies.load_paths to ActiveSupport::Dependencies.load_paths from the 2.1+ days to sort out

Testing
This caused a number of problem due to widespread use of the Test::Unit::TestCase in the code. These had to be changed a number of large search and replaces in the test tree.
  • unit tests replace Test::Unit::TestCase with ActiveSupport::TestCase
  • function tests Test::Unit::TestCase with ActiveController::TestCase
Database Migrations
Needed a little hack to move development database to rails 2.3.2. Needed to fill the schema_migrations with old style version numbers as follows:-
1.upto(391){|i|DataConcept.connection.execute "insert into schema_migrations (version) values(#{i})"}
Todo List
  • Need to work on destroy test failures, to see if bad code or test under 2.3.2
  • gloc plugin does support new internationalization API will have to be changed
  • Need to test modified action web services plugin with 2.3.2
  • Need to check with ruby 1.9.1

No comments: