Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happen if i use ruby version 2.5.1 with rails version 2.3.18?

What happen if i use ruby version 2.5.1 with rails version 2.3.18 ?

I had rails application built on rails 2.3.18 and ruby 1.9.2p320, I want to upgrade version of ruby only not the rails is it possible ?

What are the challenges i have to face with this ?

like image 898
dr. strange Avatar asked Jul 26 '18 13:07

dr. strange


1 Answers

GitHub maintain a public fork that has branches for older Rails versions, with various changes, that they've been running over time. For some time, they were running older Rails releases on newer Ruby versions than they were originally supported on, so you might find some useful hints around what needs backporting there. They haven't used 2.3 for a few years now, though, so at best it will make less work.

In general, Ruby versions make few incompatible changes, but with a codebase the size and variety of Rails, most of those few changes do hit somewhere. This seems like a bad idea to me: any security fixes in newer Ruby versions, for example, will be vastly outweighed by the known vulnerabilities in such an old Rails release.

If you're doing this because your application uses the system Ruby and you're upgrading/replacing the OS, I would instead suggest using rbenv / chruby / ruby-build / ruby-install to install the old version for this app.

It should go without saying that running such an old Rails version is highly discouraged, and exposing it to the Internet is outright dangerous -- but I'll say it anyway.

Rails LTS apparently provides a service backporting security fixes to Rails 2.3, which may make it slightly safer. They also seem to currently support running Rails 2.3 with Ruby 2.3; while that's not 2.5, it might get you closer, or be good enough.

like image 60
matthewd Avatar answered Sep 22 '22 07:09

matthewd