Created
June 17, 2012 03:59
-
-
Save loopj/2943363 to your computer and use it in GitHub Desktop.
Install Ruby 1.9 on Ubuntu 12.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Make sure we have the latest package info | |
| apt-get update | |
| # Install ruby 1.9 and some other useful related packages | |
| apt-get install -y ruby1.9.3 build-essential libssl-dev zlib1g-dev | |
| # Let "update-alternatives" know about the new ruby | |
| update-alternatives \ | |
| --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \ | |
| --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \ | |
| /usr/share/man/man1/ruby1.9.1.1.gz \ | |
| --slave /usr/bin/ri ri /usr/bin/ri1.9.1 \ | |
| --slave /usr/bin/irb irb /usr/bin/irb1.9.1 \ | |
| --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1 | |
| # Make 1.9 the default | |
| update-alternatives --config ruby | |
| update-alternatives --config gem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment