[LRUG] Upgrading a Rails v2.1.2

Murray Steele murray.steele at gmail.com
Mon Mar 5 07:14:25 PST 2012


Getting to 2.3 will get you into a good place for going up to 3.x.  The
rails_upgrade plugin that Nick mentioned is pretty useful, but it assumes
you're on a 2.3 app and you've dealt with a lot of the dep warnings from
that already.

It's also worth noting that in going from 2.1 to 3.2 (via 2.2, 2.3, 3.0,
3.1 or not) you're going to have loads of plugins and gems that suddenly
don't work.  In many cases the solution isn't to upgrade them because there
may not be a newer version that is compatible with 3.x.

I helped migrate a largeish app from 2.3 to 3.0 last year.  It was really
painful (.html_safe anyone?), but I think, worth it, in the end.

The problem is, just 'cos it's running against rails v3 doesn't mean it's
really a rails 3 app.  You'll have brought along all the
old-way-of-doing-things cruft from rails v2.  You'lll want to set aside
plenty of time to review the app as a whole to take advantage of rails 3ish
features and rework what you have once it is running on rails 3.

Good luck!

On 5 March 2012 15:04, Andrew Stewart <boss at airbladesoftware.com> wrote:

>
> On 5 Mar 2012, at 15:52, Chris Waters wrote:
> > I've got a pretty large application (200ish model classes, 100ish
> controllers) that's been running happily(ish) for about 4 years now.
>
> Aside from upgrading Rails, you'll need to consider upgrading Ruby.  If
> you're contemplating Rails 3.2 you may as well go for Ruby 1.9.3-p125.
>
> A couple of months ago I upgraded from Rails 2.3.4 / REE-something to
> Rails 3.0.8 / Ruby 1.9.3-p0.  It was painful but, in the end, worth it.
>
> I did an in-place upgrade rather than generating a new app skeleton and
> moving code across.  I'd do the same again.
>
> Good luck!
>
> Cheers,
> Andy Stewart
>
> -------
> http://airbladesoftware.com
> _______________________________________________
> 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/7ec67764/attachment.html>


More information about the Chat mailing list