Is it possible to run Ruby on Rails with Ruby 1.9x

2020-02-14 07:47发布

If so, how?

When you go to http://rubyonrails.org/download, it says:

We recommend Ruby 1.8.7 for use with Rails. Ruby 1.8.6, 1.8.5, 1.8.4 and 1.8.2 are still usable too, but version 1.8.3 is not.

4条回答
Ridiculous、
2楼-- · 2020-02-14 08:04

Based on their discussion board, Rails 2.3.0RC1 and later versions are compatible with Ruby 1.9.1 (and presumably, any later 1.9 versions). I'm guessing they haven't gotten aroudn to updating the site properly.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2020-02-14 08:10

From the announcement of Rails 2.2:

Jeremy Kemper has been rocking on both Ruby 1.9 and JRuby compatibility. Rails 2.2 is fully compatible with both, but again, there might be supporting libraries and gems that are not. Again, lots of work is going into making everything else fully compatible as well.

Then, from the release notes for Rails 2.3:

Rails 2.3 should pass all of its own tests whether you are running on Ruby 1.8 or the now-released Ruby 1.9.1. You should be aware, though, that moving to 1.9.1 entails checking all of the data adapters, plugins, and other code that you depend on for Ruby 1.9.1 compatibility, as well as Rails core.

查看更多
ゆ 、 Hurt°
4楼-- · 2020-02-14 08:11

Rails does work in 1.9 as of 2.3. I suppose they still recommend Ruby 1.8.7 because it has the most compatibility with other Ruby libraries — a lot of them are still catching up.

查看更多
够拽才男人
5楼-- · 2020-02-14 08:13

Rspec has only recently been ported to 1.9, therefore many gems have not been able to run their test suites in 1.9 until recently, so many gems are not yet stable in 1.9

查看更多
登录 后发表回答