开发者

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.


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.


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜