Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How hard is it to upgrade from Rails 1.2.3 to 2.3.5?

Is it even worth it?

I'm working on assessing a legacy code base for a client -- the source code has been largely untouched since 2007 and it's built with Rails 1.2.3.

My Rails experience began at version 2.1 -- the code is fairly stock/scaffold like and devoid of meaningful tests -- I was curious to even see if I could get it running locally -- but, I'm not even sure where to start. Right off it doesn't even know what 'rake db:create' means. Ha!

Is it going be a major pain to even getting it running in 2.3.5? Should I bother?

Would love to hear your thoughts.

Thanks

like image 279
rsturim Avatar asked Jan 13 '10 21:01

rsturim


1 Answers

If you're going to be actively developing the site, then yes, it is worth sinking the time into the project to bring it up to date. A lot has happened since Rails 1.2 which will make development a much more pleasant experience. Life without named scopes or RESTful resources is really difficult. If you're just patching the odd thing here and there, it may be worth leaving it mostly as-is and just dealing with the eccentricities.

Since 1.2.3 is just prior to the releases building up to 2.0 where a lot of warnings and deprecation notices were introduced, you could have quite a chore.

Some things to keep an eye out for:

  • Migrations are now date-tagged, not numbered, but are at least backwards compatible
  • Many vendor/plugins may not work, have no 2.x compatible version, or need to be upgraded
  • The routing engine has changed, and the name of many routes may have changed, so see what rake:routes says and get ready for a lot of search-and-replace
like image 147
tadman Avatar answered Sep 27 '22 16:09

tadman