How to get Rio working again

If you use a recent Ruby (in my case 1.9.2p0) then the very useful,
and excellent ‘rio’ gem [1] will not work. This library no longer seems
be maintained by its author, Christopher Kleckner, whose most recent
announcement to ruby-talk under the nickname ‘rio4ruby’ was at least two
years ago.

There are a couple of forks on github that solve this problem, for

To get Rio working for me, this is what I did:

git clone GitHub - gatherdigital/rio: A facade for most of the standard ruby classes that deal with I/O; Rio also provides an application level interface which allows many common I/O idioms to be expressed succinctly
cd rio
gem build rio.gemspec
sudo gem install ./rio-

I post this here in the hope that it helps someone to use this excellent
library (again).

Thanks to the people who maintain forks of this library. Hopefully an
official maintainer will emerge, reflected in the online docs at [1].


[1] See for overview