23

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!

Community
  • 1
  • 1
Paladini
  • 4,522
  • 15
  • 53
  • 96
  • I am looking up your answer, but first note that the latest version of Rails 3.2 is 3.2.19. (Rails 3.2.3 is not supported.) – dcorking Aug 06 '14 at 14:53
  • This is strange, really. Screenshot taken from my Terminal: http://s16.postimg.org/t5bv1yng5/Screenshot_from_2014_08_06_11_56_17.png – Paladini Aug 06 '14 at 14:57
  • I think your question is 'too localized' for Stack Overflow (it will be obsolete in a year or so) so you might want to edit it to be more general. Maybe this will work: 'How do I choose a compatible Ruby version for a gem, such as Rails?' – dcorking Aug 06 '14 at 15:08
  • Such a question was asked in 2012. However the answers are starting to become dated: http://stackoverflow.com/questions/9087116/which-ruby-on-rails-is-compatible-with-which-ruby-version – dcorking Aug 06 '14 at 15:46
  • I posted a more general answer at the 2012 question http://stackoverflow.com/a/25165149/1899424 – dcorking Aug 06 '14 at 16:09

2 Answers2

28

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)

mwfearnley
  • 3,303
  • 2
  • 34
  • 35
Frederick Cheung
  • 83,189
  • 8
  • 152
  • 174
2

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.

Community
  • 1
  • 1
dcorking
  • 1,146
  • 1
  • 14
  • 24
  • I used to run a rails 3.2 app on 2.0.0. I don't think it was 2.0.0 safe until about 3.2.13 or so. – Frederick Cheung Aug 06 '14 at 15:57
  • @FrederickCheung please post your comment as an answer. It is better informed than mine. – dcorking Aug 06 '14 at 16:10
  • perfect answer :) I was guided here by Google trying to find out if 3.2.22 supports Ruby 2.3 and looking at https://github.com/rails/rails/blob/v3.2.22.2/.travis.yml I quickly figured out myself that 2.2 is the best choice. – fxtentacle Jun 12 '16 at 08:59