[LRUG] Upgrading a Rails v2.1.2

Sam Phillips sam at samdanavia.com
Mon Mar 5 07:09:50 PST 2012


Hi Chris,

We released our upgrade in January, having worked on it in the tail
end of last year. My main advice would be that, although it may not
seem so at first, it is definitely possible to break the work up into
lots of component parts that can be delivered separately.

For example, a lot of our pain came from upgrading gems. Rather than
swallowing 10 gem upgrades into a larger 'rails 3 upgrade' scope, it
may be possible to do them separately as small jobs - which can then
be pushed to master and forgotten about. On the flip side of this,
some gems you're using will no doubt not be compatible with rails 3 at
all - it may be that you want to complete projects to replace these
gems before you start on the overall upgrade.

It's also possible to do the ruby 1.9 upgrade separately - as later
versions of 2.3 will run under ruby 1.9, and rails 3 will run under
1.8.7.

The advantage of delivering gradually being the same as ever - smaller
releases bring less risk. If your test coverage isn't great, real
world usage will bring out problems, and smaller releases will mean
they're easy to fix. This approach will also allow you to run other
developments in tandem - at the sharp end of our project, we had to
essentially freeze developments within the rails 2 app because
constantly porting them to rails 3 didn't seem efficient. This means a
total break in delivering value - in our case only for a week or two -
which is the last thing you want.

My other advice would be to be careful of technical scope creep - we
used the upgrade as the opportunity to make big improvements in our
test suite (particularly in our fixtures/factories), but this
exaggerated the "big bang" effect of the project.

One other word: it's not all roses on the other side. The startup
times in particular are slower!

Cheers,

Sam


On 5 March 2012 14:52, 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



More information about the Chat mailing list