Which Ruby on Rails version should I upgrade to? - ruby-on-rails

I am using Ruby on Rails 3.2.9 and on the official blog it has been posted the following article: "[SEC] [ANN] Rails 3.2.13, 3.1.12, and 2.3.18 have been released!".
My question is: Which Ruby on Rails version should I upgrade to?
Note: I ask this because in the linked blog post (and in related linked pages) there is a bit of confusion. I would be grateful if someone would tell me a little more about the upgrades.

I suggest to upgrade to the latest release of the branch you are currently using, i.e. from 3.2.9 to 3.2.13.

rails current stable version(3.2.13)

Related

How to upgrade big Ruby on Rails project from Rails version 4.2.2 to 6.0.2.2?

I have a huge rails web application with wide user base which runs on Rails 4.2.2 and Ruby 2.2.2 as of now. I simply want to upgrade the whole application to the latest version of Ruby i.e. 2.5.0 and Rails 6.0.2.2.
The reason for upgrade being I want to integrate a completely separate React.js frontend and a separate Rails backend. Other reasons for upgradation being deprecating older version of gems and rails.
I have tried researching a lot for this. I have also tried the : https://guides.rubyonrails.org/upgrading_ruby_on_rails.html guides. But everything out there is so vague and haphazard. I havent found any clear cut method until now following which I can upgrade my rails application smoothly.
Please help.
What i would recommend you to do is to upgrade to Rails 5.x.x first and than to 6.x.x you can use those guides and follow step by step:
https://www.ombulabs.com/blog/rails/upgrades/upgrade-rails-from-4-2-to-5-0.html
https://selleo.com/blog/how-to-upgrade-to-rails-6
I would recommend a progressive update for both Ruby and Rails. I would for example start by updating Ruby from 2.2.2 to 2.3, using the Release notes as guide of what things have changed:
https://www.ruby-lang.org/en/news/2015/12/25/ruby-2-3-0-released
Once that work (which would be easy to check if you have high test coverage), I would continue with Ruby 2.4 and so on.
Ruby minor releases (for example 2.2.2 to 2.2.3) shouldn't include breakable changes, so you can just go from 2.2.2 to 2.3, 2.4, 2.5 ...
Also, note that the last version Ruby is 2.7.1 and not 2.5.0. Another good reason to update your Ruby version is that it is not maintained any more and it does not receives security fixes. 2.5.8 is in security maintenance phase, which means that it won't be maintained anymore soon. You may want to update to at least Ruby 2.6.
Regarding Rails, you can find the release notes here: https://guides.rubyonrails.org/5_0_release_notes.html (just change the number in url to get the information of a different release).

Can I specify my Rails version using .asdf version manager?

Currently I have asdf for managing my versions of Ruby (2.6.5), nodejs, and yarn. I am trying to follow a Rails tutorial with version 5.2.1.
Running gem install rails -v 5.2.1 and
rails new appname version=5.2.1.
It still says version 6.0.2.1 application. I am new to Ruby on Rails so there could be something obvious I'm missing or I'm making a bigger deal out of this than it needs to be. But I'd like to follow this rather long tutorial as close as possible. I believe it is installing the correct version of rails under this path.
~/.asdf/installs/ruby/2.6.5/lib/ruby/gems/2.6.0/gems/rails-5.2.1/
Any help would be greatly appreciated. Medium blog ...
Try this
rails _5.2.1_ new appname

Is Rails version 3.1.1 compatible with Ruby version 2.3?

I am in a situation where I need to update several API-connected gems that are no longer supported by my current version of Ruby. (1.9.3) The Rails release notes for Rails version 3.1.1 state that Rails 3.1 requires Ruby 1.8.7 or higher but it's hard to tell if that includes versions of Ruby which might have been updated more recently than the release notes.
Am I good to update to 2.3 on my Rails 3.1.1 app?
Form the release notes of Ruby on Rails 3.2.13:
There is one big thing that is technically a fix but is sort of a feature: Ruby 2.0 support. Big thanks to Prem Sichanugrist for putting that together! Please give your applications a try on Ruby 2.0 and let me know how that goes.
That said: When Rails 3.2.13 was the first version of Rails with Ruby 2.0 support then it is unlikely that the older Rails 3.1.1 version is working with Ruby 2.3.

Can I update to Ruby 2.1.2 using Rails 3.2.3?

First of all, I think it isn't a prohibited question on StackOverflow since it's a precise question about environment, an objective question. But if it's prohibited, please tell me.
Currently I'm developing a specific project that is using Ruby 1.9.3 and Rails 3.2.3, at the moment we can't upgrade to Rails 4 because the project dependencies.
My question is:
Using Rails 3.2.3, we can upgrade to a newest Ruby version? If so, what version: Ruby 2.0, Ruby 2.1.2 or another one?
Also, I searched on Google and StackOverflow and I don't find a question like that.
Thanks!
The first release of rails that officially support ruby 2.0 was 3.2.13 (see the announcement on the rails blog.
I deployed several applications running 3.2.15-3.2.17 and ruby 2.0 (They've since been upgraded to rails 4) without any problems that I recall.
The recently released 3.2.22 supports ruby 2.2 (announcement)
According to the Travis configuration, Rails 3.2.3 was only tested with Ruby 1.8.7, 1.9.2 and 1.9.3, so it doesn't seem to be a good idea to use a later version of Ruby (but you can always test it yourself.) However, Rails 3.2.3 has some known security vulnerabilities that have been patched in 3.2.19.
On the other hand, the configuration for Rails 3.2.19 does suggest that the developers expect it to work with Ruby 2.0.0. Your project might benefit from investing some effort to see if you can upgrade from Rails 3.2.3 to 3.2.19, and test a combination of that with Ruby 2.0 for your application, if there are new Ruby features that you need and cannot efficiently backport them. Bear in mind that the only recent answer to a similar question warns of 'weird issues' from such a combination. Also consider that the latest Rails 3.2 release notes do not mention Ruby 2.0.

How to update rails 2.3.10 to 3.x

Currently I am using rails 2.3.10, I want to update my rails version to version 3.
What's the command to update rails?
So, the basic command would be:
gem update rails
But, upgrading from 2.3.x to 3.x isn't a trivial task... you should really read up a little more on it before you do so.
Ryan Bates shows you how to do it here. The Rails version you are using are completely different so you will have to upgrade Rails and then use this plugin to help upgrade your application unless you already know everything.

Categories

Resources