Extremely Outdated Rails App

I’m in serious need of some help. I have an application running on Heroku on Ruby 2.3.8 and Rails 3.2. The stack on Heroku is no longer supported and needs major updating (my own fault for putting it off for so long). I can no longer push updates to my app until it is upgraded. Upgrading would take a long long time. I’ve already started trying to get Rails 4.0 running after many hours am still struggling. My app has users and I’m afraid something is going to break and I wont be able to do anything about it. I’ve also looked at starting a fresh new app on the latest Rails version and trying to port my code but my Mac is old as well causing more issues. Any advice?

Is your source code on github? How’s the test coverage on the app? I can upgrade it for you, email me off-list – hasan.diwan@gmail.com. – H

I just read a discussion on a similar if not same situation, probably on Stackoverflow.

Standard advice is to do a major Rails upgrade at a time. Upgrading Ruby on Rails — Ruby on Rails Guides, but many said start over.

I’ve upgraded and it’s painful. You’ve probably got many approaches and gems that are totally different today and don’t work together in the same way. In other words your going to deal with an issue in one upgrade and have it figured out and then in the next upgrade it’s going to have changed.

In your case it’s probably worth starting over. Figure out what is new that you may or may not want.

If you haven’t already build an app from scratch. One current dilemma is that webpacker/Hotwire is unsettled. Learn about npm/yard vs gems. The swing was to npm/yarn but it may be swinging back. If I understand it you can install gems via yarn without them showing up in your gem list which can be confusing. The documentation on this webpacker/sprockets hasn’t caught up. If you’ve have JavaScript or even if you don’t having css in your javascript folder is confusing.

My inexpert advice. Start over and copy in pieces at a time. But if you’re using an existing database which no doubt you will, you may have to generate those scaffolds at the beginning.

Rereading your question, dealing with an out of date Mac and out of date software may be too much. You don’t say how old your Mac is, but macOS no longer keeps Ruby up to date. chruby seems like the easiest way to deal with this. Get a new Mac or find a good used one that uses latest OS. From what you said this seems essential. Have you tried a new app on your existing Mac? If it works you may be fine.

Good luck

Another significant change. As the article says this happened in Rails 5.2, so it’s well covered in discussions and blogs. Again a reason to start over, you won’t have any of the less secure stuff hanging around.

Does it mean you cannot run it anymore or just that it’s not recommended? You could still run it on your own server (I am just finishing a book to help you do that) and with Rails LTS service you could still run a little longer even when security updates are considered (I am not affiliated).

Of course those steps are only to give you a little bit more time and you need to upgrade eventually. As it was already mentioned the guide is the best starting point. We don’t know your application/gems so there can hardly be said any more than that. Go version by version, don’t try to upgrade to 6.2 at once.

1 Like

This post was flagged by the community and is temporarily hidden.

Well, I’d say that this is sort of a Herculean task to update from Rails 3.2 to 6.x (7.x is coming). Doable, but a lot of effort.

I was in a similar situation (lucky that it was just Rails 5 → Rails 6). I’m an experienced developer (25+ years), but I had zero Rails experience a year ago, and I was afraid to do it by myself (who wants to introduce security holes). We’ve decided to pay an agency do to this for us. Code base was migrated, gems replaced, Rails 6, Ruby 3, Stimulus, etc. I took this as an opportunity to learn Rails from way more experienced people, and I’m maintaining it & keeping it up-to-date on my own now.

I’d a) pay someone to do it for you, b) start from scratch (re-use DB, models, copy & paste piece by piece).

Your question, problem, is too broad, and you should not expect a silver bullet answer. It’s better to ask specific questions like - what this new configuration option means, is there a replacement for gem XYZ because XYZ supports just Rails 4, etc.