Horrible migration path?

19 views
Skip to first unread message

Robert Nicholson

unread,
Aug 22, 2018, 9:30:34β€―AM8/22/18
to Ruby on Rails: Talk
We have a rails application that’s been running on an old version of Rehat 4.

We have to move it to Redhat 7

It was

apache 2.2.4, ruby 1.8.7, rails 2.3.8, passenger 2.2.5

and we’re expected to migrate to

apache 2.4.27, ruby 2.51, rails 5.2.1 and passenger 5.3.4

This application used gems like

search logic
will_paginate
composite_primary_keys

to name a few.

…..

Are there any migration guides that highlight the complexity involved?

Colin Law

unread,
Aug 22, 2018, 9:41:56β€―AM8/22/18
to Ruby on Rails: Talk
On Wed, 22 Aug 2018 at 14:30, Robert Nicholson
<robert.n...@gmail.com> wrote:
> ...
> Are there any migration guides that highlight the complexity involved?

This is a good place to start
https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html

Colin

Hassan Schroeder

unread,
Aug 22, 2018, 11:09:09β€―AM8/22/18
to rubyonrails-talk
On Wed, Aug 22, 2018 at 6:30 AM, Robert Nicholson
<robert.n...@gmail.com> wrote:

> apache 2.2.4, ruby 1.8.7, rails 2.3.8, passenger 2.2.5
>
> and we’re expected to migrate to
>
> apache 2.4.27, ruby 2.51, rails 5.2.1 and passenger 5.3.4

> Are there any migration guides that highlight the complexity involved?

😱😱😱😱😱😱😱😱😱😱😱😱😱

Your options:

1) migrate (very slowly) version-by-version

2) "big bang" re-implement the entire app on the current Ruby/Rails

3) continue running the old version and start replacing it piecemeal
(the "Strangler Pattern")

Good luck!
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Phil Edelbrock

unread,
Aug 22, 2018, 11:09:37β€―AM8/22/18
to rubyonra...@googlegroups.com
How complex is the app? From the positing of your question from the subject line, I assume you don't want to migrate.

It might be a good time for a rewrite if you are jumping from rails 2.x to 5.x. If security, speed and features aren't a concern, stick to your older rails env (imho) if you are just trying to limp the app along.


Phil

Phil Edelbrock

unread,
Aug 22, 2018, 11:25:23β€―AM8/22/18
to rubyonra...@googlegroups.com


> On Aug 22, 2018, at 8:08 AM, Hassan Schroeder <hassan.s...@gmail.com> wrote:
>
> On Wed, Aug 22, 2018 at 6:30 AM, Robert Nicholson
> <robert.n...@gmail.com> wrote:
>
>> apache 2.2.4, ruby 1.8.7, rails 2.3.8, passenger 2.2.5
>>
>> and we’re expected to migrate to
>>
>> apache 2.4.27, ruby 2.51, rails 5.2.1 and passenger 5.3.4
>
>> Are there any migration guides that highlight the complexity involved?
>
> 😱😱😱😱😱😱😱😱😱😱😱😱😱
>
> Your options:
>
> 1) migrate (very slowly) version-by-version
>
> 2) "big bang" re-implement the entire app on the current Ruby/Rails
>
> 3) continue running the old version and start replacing it piecemeal
> (the "Strangler Pattern")
>
> Good luck!

LOL, well said. I wouldn't recommend #1, imho. A lot of extra work to get to the end. Just rewrite, or let things be as they were. Upgrading Apache and Passenger probably aren't going to impact the migration of the app. A newer Ruby *might* require some updates in the app (but give speed improvements). Keeping on the old Rails and otherwise old app code probably would still work in the new environment (albeit, there could be security concerns).


Phil

Norm Scherer

unread,
Aug 22, 2018, 1:02:10β€―PM8/22/18
to rubyonra...@googlegroups.com
For security concerns you might investigate rails long term support
(https://railslts.com).Β  They maintain a 2.3.18+ version of the system
with security updates. The path to 2.3.18 is easy but it starts to get
fairly complex after that.Β  Prototype is not supported and jquery is the
default option, gems you have been using are no longer there etc.Β  I
don't believe rails 2.3 will run on ruby above 1.8.7 without changes. I
am going through the same process and it isn't easy.

Is the migration mandatory or could you install rails 2.3 and ruby 1.8.7
on the new system?

Norm

Rob Jonson

unread,
Aug 23, 2018, 8:09:09β€―AM8/23/18
to Ruby on Rails: Talk
the main change here is the rails version.Β 
Once you figure out the update requirements for that - the apache / ruby / passenger changes are (probably) a non-issue.

the key question is whether you have test coverage on the original app. If you do, then I'd be tempted to do a big-bang update.
fire it up in a development environment, upgrade all the gems (things are going to break anyway - so no point in fighting the gem battle separately from the rails battle).

then run your tests and see what happens.

odds are that 95% of the changes will be handled in the upgrade guide with things like params handling.

you'll also need a 2-3 upgrade guide!
Reply all
Reply to author
Forward
0 new messages