[LRUG] Upgrading a Rails v2.1.2

Ben Aldred benaldred at gmail.com
Mon Mar 5 07:11:45 PST 2012


Hi Chris,

About a month ago I did an update from 2.4 to Rails 3.1 but without asset
pipeline enabled. It was a little bit painful because the unit test
coverage was patchy.

   1. The Rails upgrade plugin was useful
   2. I used Git to manage the upgrade
   3. There are a few Railscasts about it which are helpful and it looked
   liked using rvm may have helped (i'm using rbenv)
   4. Make sure your unit test coverage is good!!!

The pain points I encountered

   1. The Active Record sytax had changed a lot and there were a lot of
   scopes and DB calls in the app I upgraded, some where missed by the plugin.
   2. There was RJS in the app (errh) which caused a few issues but the
   prototype gem helped a lot with that.
   3. The mailers changed but actually not too much bother
   4. Some gems did not work and had to be patched or removed

+1 for ruby 1.9

Hope that helps,

Ben

-- 
Ben Aldred
Director, Tiny Code Factory
web <http://tinycodefactory.com/> | twitter:
@tinycodefactory<http://twitter.com/tinycodefactory>
 | facebook <http://facebook.com/tinycodefactory>

On 5 March 2012 15:10, Sidu Ponnappa <ckponnappa at gmail.com> wrote:

> Go all the way, but via 2.3. Basically 2.1.2 => 2.3.latest => 3.2
>
> > I'm assuming that the upgrade to 2.3.4 should be reasonably straight
> forward
> That depends on how much metaprogramming fun people have had on this
> codebase and how many of your plugins made the transition from 2.1 to
> 2.3.
>
> > One thing that is looming in the background is that the test coverage
> is, er, not 100% and that a lot of the code has been written a long time
> ago by coders who are no longer here.
> The last time we did something like this for a client, it took seven
> months. Most of this earned us no revenue because we estimated it
> would take four weeks (the app had decent coverage) and billing our
> client for this kind of miscalculation on our part would have been
> unfair. *sigh*
>
> > Anyone get any words of advice?  Is it worth the pain?
> Not really. If the app is business critical, you just have to deal
> with it. Just remember to set realistic expectations around delivery
> timelines (anywhere from 2 weeks to several months :P) and ensure that
> there is a development freeze in place on the codebase while the
> migration is in progress. Also, don't do both Ruby and Rails at the
> same time.
>
> Best,
> Sidu Ponnappa.
> http://c42.in
> http://rubymonk.com
> http://twitter.com/ponnappa
>
>
> On 5 March 2012 20:22, Chris Waters <chris at yougroup.co.uk> wrote:
> > Hi LRUG,
> >
> > I've got a pretty large application (200ish model classes, 100ish
> > controllers) that's been running happily(ish) for about 4 years now.
> >
> > It is Rails 2.1.2 running against Ruby 1.8.7.  It feels as though it is
> time
> > that we brought things up-to-date as things are starting to creak.
> >
> >
> > To my mind, there are 2 options;
> > * we upgrade to v2.3.4 and be happy with that for now
> > * or continue on from 2.3.4 and go the whole hog and get to v3.2
> >
> > One thing that is looming in the background is that the test coverage is,
> > er, not 100% and that a lot of the code has been written a long time ago
> by
> > coders who are no longer here.
> >
> > I'm assuming that the upgrade to 2.3.4 should be reasonably straight
> > forward, and that the big leap to 3.2 is likely to hurt more.
> >
> >
> > Anyone get any words of advice?  Is it worth the pain?  How many people
> out
> > there are still running against 2.1.2?
> >
> >
> > Thanks for any comments/help
> >
> > Chris.
> >
> >
> > Chris Waters
> > Lead Developer
> > YOU Group
> > _______________________________________________
> > Chat mailing list
> > Chat at lists.lrug.org
> > http://lists.lrug.org/listinfo.cgi/chat-lrug.org
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120305/fb084ac2/attachment.html>


More information about the Chat mailing list