Horrible migration path?

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?

This is a good place to start

Colin

:scream::scream::scream::scream::scream::scream::scream::scream::scream::scream::scream::scream::scream:

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!

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

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

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

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!