dsjbirch
January 28th, 2010, 01:45 AM
Hope this helps someone, I've just done a fresh install of Karmic, here's the steps I followed.
Ruby and RVM on Ubuntu from source
nb, you might remove zlib1g zlib1g-dev from the list below, I ended up needing to install it again later from source I dunno why
Getting prepared
$ apt-get update
$ apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev sqlite3 libsqlite3-dev locate git-core libssl-dev openssl autoconf subversion bison
$ apt-get -y install curl wget
Get, Compile and configure zlib
$ cd ~/Downloads
$ wget http://www.gzip.org/zlib/zlib-1.2.3.tar.gz
$ rm zlib-1.2.3.tar.gz
$ cd zlib-1.2.3
$ ./configure
$ make
$ make test
$ sudo make install
Add /usr/local/lib to your environment path
$ sudo gedit /etc/environment
nb, I was gonna opt for ruby 1.9.1 but you need a prior version of ruby installed to compile it! Install 1.9.1 later using rvm
SVN checkout ruby repo into Downloads folder
$ cd ~/Downloads
$ svn co http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7
nb, I'm not sure if you really need to do a sudo make here, maybe just a plain make will suffice?
Compile and install ruby
$ cd ~/Downloads/ruby_1_8_7
$ autoconf
$ ./configure
$ sudo make
$ sudo make install
Get gems manager
$ cd ~/Downloads
$ wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
Rubygems: Unzip, install and tidy
$ tar xvzf rubygems-1.3.5.tgz
$ cd rubygems-1.3.5
$ sudo ruby setup.rb
$ cd ..
$ rm rubygems-1.3.5.tgz
Install rvm from github
$ mkdir -p ~/.rvm/src/rvm/
$ cd ~/.rvm/src
$ git clone http://github.com/wayneeseguin/rvm.git
$ cd rvm
$ ./install
Get stuff for other ruby environments, recommended by rvm
$ aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk
$ aptitude install curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev git-core
$ aptitude install curl mono-2.0-devel
QUOTE FROM HANDY RVM OUTPUT
"
You must now finish the install manually:
1) Place the following line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:
if [[ -s /home/user/.rvm/scripts/rvm ]] ; then source /home/user/.rvm/scripts/rvm ; fi
2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly).
3) CLOSE THIS SHELL and open a new one in order to use rvm.
"
$ gedit ~/.bashrc
$ gedit ~/.bash_profile
You aught now to be able to
$ rvm install 1.9.1
or
$ rvm install jruby
and if that works, how about
$ rvm 1.9.1 --default
now look,
$ ruby -v
cool eh \\:D/
Start here for more help and commands
http://rvm.beginrescueend.com/introduction/
Ruby and RVM on Ubuntu from source
nb, you might remove zlib1g zlib1g-dev from the list below, I ended up needing to install it again later from source I dunno why
Getting prepared
$ apt-get update
$ apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev sqlite3 libsqlite3-dev locate git-core libssl-dev openssl autoconf subversion bison
$ apt-get -y install curl wget
Get, Compile and configure zlib
$ cd ~/Downloads
$ wget http://www.gzip.org/zlib/zlib-1.2.3.tar.gz
$ rm zlib-1.2.3.tar.gz
$ cd zlib-1.2.3
$ ./configure
$ make
$ make test
$ sudo make install
Add /usr/local/lib to your environment path
$ sudo gedit /etc/environment
nb, I was gonna opt for ruby 1.9.1 but you need a prior version of ruby installed to compile it! Install 1.9.1 later using rvm
SVN checkout ruby repo into Downloads folder
$ cd ~/Downloads
$ svn co http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8_7
nb, I'm not sure if you really need to do a sudo make here, maybe just a plain make will suffice?
Compile and install ruby
$ cd ~/Downloads/ruby_1_8_7
$ autoconf
$ ./configure
$ sudo make
$ sudo make install
Get gems manager
$ cd ~/Downloads
$ wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
Rubygems: Unzip, install and tidy
$ tar xvzf rubygems-1.3.5.tgz
$ cd rubygems-1.3.5
$ sudo ruby setup.rb
$ cd ..
$ rm rubygems-1.3.5.tgz
Install rvm from github
$ mkdir -p ~/.rvm/src/rvm/
$ cd ~/.rvm/src
$ git clone http://github.com/wayneeseguin/rvm.git
$ cd rvm
$ ./install
Get stuff for other ruby environments, recommended by rvm
$ aptitude install curl sun-java6-bin sun-java6-jre sun-java6-jdk
$ aptitude install curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev git-core
$ aptitude install curl mono-2.0-devel
QUOTE FROM HANDY RVM OUTPUT
"
You must now finish the install manually:
1) Place the following line at the end of your shell's loading files(.bashrc and then .bash_profile for bash and .zshrc for zsh), after all path/variable settings:
if [[ -s /home/user/.rvm/scripts/rvm ]] ; then source /home/user/.rvm/scripts/rvm ; fi
2) Ensure that there is no 'return' from inside the .bashrc file. (otherwise rvm will be prevented from working properly).
3) CLOSE THIS SHELL and open a new one in order to use rvm.
"
$ gedit ~/.bashrc
$ gedit ~/.bash_profile
You aught now to be able to
$ rvm install 1.9.1
or
$ rvm install jruby
and if that works, how about
$ rvm 1.9.1 --default
now look,
$ ruby -v
cool eh \\:D/
Start here for more help and commands
http://rvm.beginrescueend.com/introduction/