Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Ruby 1.9.2-p290 Released: The Lowdown on Ruby’s Latest Production Release

By Peter Cooper / July 16, 2011

Over at the always-riveting official Ruby blog, Shota Fukumori has announced the release of Ruby 1.9.2-p290, the latest 'patchlevel' release of the current production release of Ruby MRI.

If you're still on 1.8, check out The Ruby 1.9 Walkthrough, a mega screencast aimed at Ruby 1.8.7 developers who want to learn all about what's new, what's gone, and what's different in Ruby 1.9.2 and 1.9.3.

Patchlevel 290 is the first production-level patchlevel release of MRI since patchlevel 180 back in February so it's worth upgrading if you're on 1.9.2. The release post duly notes:

This release doesn't include any security fixes, but many bugs are fixed in this release.

Shota Fukumori

So what changed? And how can you upgrade? Let me spill the beans.

What's Changed From p180 to p290?

Quite a lot got changed in terms of the numbers. 132 files were tweaked with a total of 3505 lines added and 788 taken away.

A selection of the fixes:

  • require 'date'; === nil throws an undefined method error for coerce on p180 - this has now been fixed
  • The Thread.kill segfaults when the object to be killed isn't a thread bug has been resolved.
  • Tweaks to reduce segmentation faults when using zlib on x86-64 Darwin (OS X) - always good
  • Modification to prevent random number sequence repetition on forked child processes in SecureRandom
  • Fix to io system to resolve a Windows-only bug where characters are being read incorrectly due to ASCII not being treated as 7 bit
  • A tweak to Psych (the YAML parser) to plug a memory leak
  • Load paths are now always expanded by rb_et_expanded_load_path (I think this might yield a performance gain?)
  • Fixes to Psych's treatment and testing of string taint
  • Prevention of temporary objects being garbage collected in some cases
  • Fixes to resolve compilation problems with Visual C++ 2010
  • A fix so that Tk's extconf.rb would run successfully
  • Lots of Tk related fixes generally - I'm guessing Tk is very popular amongst the core team, particularly in Japan, because it seems to be a common release blocker.
  • A fix to string parsing to resolve an obscure symbol-containing-newlines parsing bug

How To Upgrade to Ruby 1.9.2-p290

If you're on Windows, RubyInstaller 1.9.2-p290 has been released.

If you compile your own version of Ruby, just grab one of the archive files listed in the official post and do your usual compilation shuffle. Nothing new there.

If you're an RVM user, you'll be glad to know the RVM team were on the ball and released an update within hours to support p290. Your upgrade steps are:

rvm get head
rvm reload

At this stage, you can either run rvm install ruby-1.9.2-p290 to install p290 from scratch, or if you're already running p180 and wish to upgrade your existing environment, run rvm upgrade ruby-1.9.2-p180 ruby-1.9.2-p290 and you're cooking with gas.

Some users have noticed that running rvm upgrade as above got an error where the wrong RVM executable was being run, but it seems to resolve itself if you open a fresh shell (despite running rvm reload) so try that out if you hit the "Unable to install" error.


  1. Taybin says:

    Do I need to walk over to Japan and hammer the semantic versioning doc on someone's door Luther-style?

    When will this craziness end?

    Production release of the ruby language? Then make it 1.9.3. It *should* be 2.0.3, but I'll let that slide for now.

  2. Peter Cooper says:

    Heh, yeah, we're kinda nested down about 4 levels here, aren't we?

    Next step.. Ruby 1.9.2p400-release-candidate-3-nightly

  3. Fernando says:

    So this release does not include the "require patch", does it?

  4. Olivier Lacan says:

    Opening a new shell window does fix the issue with upgrade but there's another issue later on (after compile and install):

    ERROR: Error running 'rvm gemset pristine' under ,
    please read /Users/olivier/.rvm/log//gemset.pristine.log

    Anyone running into the same issue with existing gemsets?

  5. Olivier Lacan says:

    Other issue, once I upgraded my ~/.rvmrc file was botched, the last two lines were concatenated on one line.

    This solution fixed it:

  6. Ruby Noob says:

    Very very very rookie here. I would like to upgrade my environment on my mac (OS X snow leopard) but no clue how to do that. I'm pretty sure I'm not using RVM since I've no idea what that is... so I'm guessing I need to do so with a compile since I just followed the steps from Hivelogic for p180 on my first install?

    Any links or advice you could provide would be awesome. :)

    Here is a link to the page I followed for my first install in case the obscure reference to Hivelogic is not sufficient:


    Embarrassed Noob

  7. Sandeep Kumar says:


    Nice article. Only one thing is missing there,

    On RVM, if want to upgrade a ruby patch/version the syntax should be:
    rvm upgrade ruby-version-[patch] (to) ruby-version[path] (from).

    So it should be,
    rvm upgrade ruby-1.9.2-p290 ruby-1.9.2-p0/ruby-1.9.2-p180


  8. Gravis says:

    I must say, it's pretty confusing for new comers to ruby. They can't figure out easily what's the current stable release. +1 on "1.9.3".
    Also, great thanks to all teams, inclusing rvm, the upgrade process has never been so easy.

  9. Peter Cooper says:

    @Sandeep: At least on mine it's rvm upgrade FROM TO.. not the other way around. I even copied and pasted the working line from my terminal to this article :-) I don't know if they changed it or if it was different in other versions of RVM though.

    @Ruby Noob: You need to start using RVM. It's really the best way forward here and will give you the least headaches (once it's installed) especially if you want to upgrade in future or even try out other Ruby implementations.

    @Oliver: Yes, I had exactly the same problem but it appeared not to be of significant effect since all my gems still run fine. I *suspect* the problem is that we're running older version of RubyGems. Given all the problems with newer versions, I haven't bothered upgraded from 1.6.2 and I don't think that version supports pristine anyway ;-)

  10. Ruby Noob says:

    Hrm I know this isn't a RVM tech support forum so if you can't answer no biggie, but for some reason after installing RVM and performing the
    rvm upgrade ruby-1.9.2-p180 ruby-1.9.2-p290
    step it tells me I don't have the p180 version installed.
    $ which ruby
    tells me the p180 version is located in /usr/bin/ruby

    Again I apologize for clogging up your blog with "how to" questions... I'll keep plugging away and try to figure it out. No worries if you'd rather not answer in this post.

  11. Peter Cooper says:

    @Ruby Noob: Ah, if you're just installed RVM, you just want to do a regular install, like rvm install ruby-1.9.2-p290 - give that a try! :)

  12. RubyUser4543 says:

    @Ruby Noob,

    Just follow this guide to isntall rvm:

    Using rvm is becoming the standard way to install Ruby on *nix systems.
    Once you have rvm installed, installing/uninstalling any ruby versions will be a piece of cake.

    Don't be lazy, read up on rvm! :-)
    And enjoy Ruby, an amazing language!

  13. Dan says:

    I have 2 rubies, now after upgrade, 'rvm gem list' and 'rvm gem help' spit out the same output twice. I wonder why.

  14. The Arcadian says:

    Wow I haven't touched tk since 94 (tcl/tk)... Had no idea there was an active Ruby/TK community out there, never even seen a code sample.

  15. Dewayne says:

    I ran into a shebang problem with the rvm upgrade that even rvm reset would not fix. Had to go into each of the bin wrapper files and change the shebang from pointing to p180 to p290.

  16. Murray Bozinsky says:

    I highly recommend you that you NOT use RVM.

    There are so many bugs and gotchas that I found every upgrade time, be it Ruby, JRuby, or some gem to be an exercise in frustration and RVM was always the culprit.

    I have no issues running 1.8.7, 1.9.2 and JRuby without RVM. A few .profile tweaks is all it takes and I don't have to worry about all the problems RVM causes.

    The first thing you need to learn when becoming a programmer is to not blindly accept idioms and standards the community developed. 99% of the time you will want to use them, but blindly doing so can lead to multiple issues that only cause problems. In short, break the rules when there is a good reason to do so, despite what the anal-retentives say. And that includes not mindlessly jumping on the RVM bandwagon.

  17. Ed Jones says:

    For those of us insane enough to use Windows, pik seems not to like this patch.

    I tried both the pik install command and also using the ruby installer to install it in my .pik>rubies directory, followed by pik add.

    (yes in admin mode, and also pik 0.2.8)

  18. Claudio Poli says:

    Ruby version numbers has always been fascinating to the most, remove patchlevels already :p

    @Peter Cooper
    "Load paths are now always expanded by rb_et_expanded_load_path (I think this might yield a performance gain?)"

    If you are referring to the somewhat recent discussions about Ruby performance in loading files I'm not seeing any improvements, I only got a slight gain (1s/2s over 25s+) with both patches I've seen around here.
    However I think I saw some related commit in head, haven't tried yet because a complex rails app bombs in few places on 1.9.3 so I have to stick to 1.9.2 for now.

  19. Pingback: The Official Ruby Site Is Proudly Maintained by No-One

  20. Pingback: Ruby 1.9.3 Preview 1 Released – What’s New?

Other Posts to Enjoy

Twitter Mentions