Sunday, May 1, 2011

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

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.

From stackoverflow
  • 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.

    railsninja : Compatible doesn't mean recommended, some gems are still catching up, when they do I'm sure 1.9 will be recommended.
  • 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.

  • 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

  • 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 comments:

Post a Comment