7

I am developing for years with Ruby on Rails on Ruby 1.8.7 (Enterprise Edition). And there is 1.9.2 latest version.

What benefits can I get using 1.9.2? What about encoding support (I heard about some issues)? Is it faster? Is it more stable? etc

At the moment I am about to start a new project. So I am thinking about using 1.9.2 in production.

fl00r
  • 82,987
  • 33
  • 217
  • 237
  • I used Ruby 1.9.2 and then started to [get errors](http://stackoverflow.com/questions/5087432/ruby-crashes-on-windows) so switched to 1.8.7. So my opinion is better stay on Ruby 1.8.7. – Harry Joy May 10 '11 at 13:08
  • I don't use Windows, so maybe it is more stable on *nix? – fl00r May 10 '11 at 13:10
  • You should consider migrating to ruby 1.9.2-p136 on Windows. – marzapower May 10 '11 at 13:18
  • 1
    If you don't use Windows, go with 1.9.2, if you are aware of the gotchas. Ther are fewer of them. – Jason Lewis May 11 '11 at 01:23
  • 1
    Go with 1.9. Go go! In fact, 1.9.3 is coming within months. The present plan seems to be July or August this year. – sawa May 11 '11 at 20:40

3 Answers3

7

My experience has with using 1.9.2 in production has been excellent. For a new project, esp. with Rails 3, I wouldn't recommend anything else. The Unicode support in 1.9 actually removes many, many, encoding headaches, plus 1.9.2 is quite a bit faster, and stability is a dream.

Of course, if you're migrating a project to 1.9.2, you wanna make sure you have good test coverage before you start, because there were changes, deprecations, etc.

For a really in-depth at the encoding issue, and what changed in 1.9.2, read this article by Yehuda Katz.

Jason Lewis
  • 1,314
  • 8
  • 13
2

If you are starting a new project, 1.9.2 has many advantages: encoding support, native threads and fibers, more consistent APIs.

But it does change things, so be aware. One that got me recently: Object#methods returns Strings in 1.8 and Symbols in 1.9.

See What is the difference between Ruby 1.8 and Ruby 1.9

Community
  • 1
  • 1
bheeshmar
  • 3,125
  • 1
  • 19
  • 18
1

I am running a few projects now on 1.9.2 and as long as you keep yourself armed with rvm you should be good. The only problem that is giving me trouble at this point is the slow require which will be fixed in 1.9.3 coming out in a month or so.

Note that you also lose the advantages of REE if you use them (like copy-on-write friendliness), since it's not clear when REE will come out for YARV (if ever).

Julik
  • 7,676
  • 2
  • 34
  • 48