From: David Masover Date: 2009-12-08T16:57:45+09:00 Subject: Re: Install ruby 1.9.1 On Tuesday 08 December 2009 12:15:06 am Ruby Freak wrote: > I spent an hour trying to find reasonable instructions on how to > install ruby 1.9.1 as a standalone ruby instance. sudo apt-get install ruby1.9.1 > Everything seems to > be directed at side-by-side 1.8/1.9 installation. Mostly because it's not really to where we can safely ignore either of them. But you could probably adapt this: Just ignore the parts about 1.8. Or, better yet -- the only real reason you can't just 'apt-get install ruby1.9.1', or for that matter, 'apt-get install ruby1.9.1 rubygems1.9.1 irb1.9.1 ruby1.9.1-dev ...' ...is because it installs the binary as /usr/bin/ruby1.9.1, which is going to be annoying and inconvenient. But yeah, basically, anything that told you to install rubyfoo or libfoo-ruby or anything like that, chances are, there's an equivalent package for 1.9.1. > Here is what I did: > > 1: Download ruby 1.9.1, > ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz ( I actually got > p243 at ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p243.tar.gz) > > 2: To ensure that the installation of the necessary tools > sudo apt-get install build-essential > sudo apt-get install autoconf > > 3: > tar xzvf ruby-1.9.1-p0.tar.gz > cd ruby-1.9.1-p0(actually p243) > autoconf > sudo makedir /opt/ruby > ./configure --prefix=/opt/ruby --enable-pthread > make > sudo make install > > 4 Installed? > /opt/ruby/bin/ruby -v yuck. I guess you could upgrade, since it may be awhile before Ubuntu/Debian pick up the latest patch set. But since this is the version you'd be doing anyway, I'd do: sudo rm -rf /opt/ruby Then do this: cd /usr/local/bin for i in /usr/bin/*1.9.1; do sudo ln -s $i `basename $i 1.9.1`; done And you're done. Be aware that not everything works in 1.9.1 yet, so you may end up wanting some options after all.