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

前端 未结 4 819
我寻月下人不归
我寻月下人不归 2020-12-21 07:29

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 an

相关标签:
4条回答
  • 2020-12-21 08:16

    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.

    0 讨论(0)
  • 2020-12-21 08:17

    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

    0 讨论(0)
  • 2020-12-21 08:24

    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.

    0 讨论(0)
  • 2020-12-21 08:25

    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.

    0 讨论(0)
提交回复
热议问题