[LRUG] Upgrading a Rails v2.1.2

Riccardo Tacconi rtacconi at gmail.com
Mon Mar 5 08:09:21 PST 2012


I am migrating a Rials app from 2.3.12 to Rails 3.0 not 3.1 or 3.2. I will
migrate the app to use the asset pipeline later, just to brake the
migration in more steps. Rails upgrade plugin is very helpful, as the other
guys mentioned. I updated the gems and strated to use ruby 1.9.2, than
fixed the issues the where braking the application, fixed the specs and
then following the advices of Rails upgrade plugin. Specs or tests are
really fundamental during the upgrade. I printed the output of 'rake
routes' before and after the gem updates and route.rb upgrade to check for
differences.

On 5 March 2012 16:39, Tom Stuart <tom at therye.org> wrote:

> On 5 Mar 2012, at 14:52, Chris Waters 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
>
> Hi Chris,
>
> I had exactly this project with exactly these versions at a previous job.
> Going up to Rails 2.3 (in terms of making the inadequate automated tests
> pass, not in terms of everything being verified working) took 2 months of
> my time. Off the top of my head, things that made it take this long, rather
> than the fairly long slog I was expecting:
>
> 1. Downstream changes in vendored gems/plugins
> 2. Vendored in-house gems/plugins which monkey-patched the internals of
> other gems/plugins
> 3. Monkey patches to the internals of RSpec to make some fancy matchers
> work
> 4. 5 different but overlapping test suites.
>
> I'd imagine your app isn't in such a woeful state, but if any of the above
> rings true I'd be very wary of embarking on an upgrade project. Yes, it
> will reduce the maintenance burden in future, but you're sinking a lot of
> time into it and I'd venture that one of the reasons the app is still on
> Rails 2.1 is because it's already unwieldy to maintain. IOW, I'd suggest at
> least considering as an alternative spending your developer time on:
>
> 1. Identifying parts of the application which can be split out into
> smaller ones
> 2. Implementing these smaller applications in Rails 3/Sinatra/whatever
> 3. Integrating them back into your monolithic app and removing the
> redundant code.
>
> Cheers,
>
> Tom
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>



-- 
Riccardo Tacconi
Ruby on Rails and PHP development - System Administration
VIRTUELOGIC LIMITED

http://github.com/rtacconi
http://riccardotacconi.blogspot.com
http://twitter.com/rtacconi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120305/87544dd5/attachment.html>


More information about the Chat mailing list