fl00r
fl00r

Reputation: 83680

Ruby version for production

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.

Upvotes: 7

Views: 892

Answers (3)

Julik
Julik

Reputation: 7856

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).

Upvotes: 1

bheeshmar
bheeshmar

Reputation: 3205

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

Upvotes: 2

Jason Lewis
Jason Lewis

Reputation: 1314

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.

Upvotes: 7

Related Questions