Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 807
Paladini Avatar asked Aug 06 '14 14:08

Paladini


People also ask

Which version of Ruby should I use for rails?

Rails 5 requires Ruby 2.2.


2 Answers

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)

like image 111
Frederick Cheung Avatar answered Oct 17 '22 03:10

Frederick Cheung


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.

like image 42
dcorking Avatar answered Oct 17 '22 03:10

dcorking