Can I update to Ruby 2.1.2 using Rails 3.2.3?

坚强是说给别人听的谎言 提交于 2019-11-30 00:24:03

问题


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!


回答1:


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)




回答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.



来源:https://stackoverflow.com/questions/25163338/can-i-update-to-ruby-2-1-2-using-rails-3-2-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!