Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

migrating from old blog

  • Loading branch information...
commit 292b5088a4470b1e2a4380a84885853025c7cc00 1 parent 8e9a607
Zachary Scott authored
Showing with 119 additions and 0 deletions.
  1. +119 −0 Ruby_with_RVM_on_Ubuntu_10.04
119 Ruby_with_RVM_on_Ubuntu_10.04
View
@@ -0,0 +1,119 @@
+#How to: Ruby with RVM on Ubuntu 10.04 Lucid Lynx
+
+I'm going to assume you have a fresh install of Ubuntu 10.04 Lucid Lynx. As well as familiarity with the command line, specifically bash, git or curl, and synaptic.
+
+##Prerequisites
+
+First we've got to install some common libraries used by rvm and ruby.
+
+ sudo apt-get install build-essential
+
+ sudo apt-get install libssl-dev curl autoconf libreadline5-dev libreadline6-dev libxml2-dev zlib1g zlib1g-dev libssl-dev bison openssl libreadline5 libreadline-dev ruby
+
+##Curl
+
+The first way to install rvm is with curl.
+
+ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
+
+##Git
+
+Another way to install rvm is with git.
+
+ sudo apt-get install git-core
+
+ mkdir src | cd src
+ git clone http://github.com/wayneeseguin/rvm.git | cd rvm
+ ./install
+
+##Updating your bash profile
+
+Following the install of rvm we'll need to update our bash user config. Changes can be made with any editor or your choice, I prefer vim.
+
+At the top of the file we need to change a line.
+
+ -- [ -z "$PS1" ] && return
+ ++ if [[ -n "$PS1" ]]; then
+
+Now at the bottom of the file we'll add:
+
+ if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
+ fi
+
+##Testing it out
+
+Now if you restart bash you should be able to try:
+
+ type rvm | head -n1
+
+And see something that resembles:
+
+ rvm is a function
+
+You're now free to remove the system ruby packages.
+
+ sudo apt-get remove ruby
+ sudo apt-get autoremove
+
+##Ruby Enterprise Edition
+
+You're probably going to want to set up a new ruby and even set it as your default. Ruby Enterprise Edition is a great implementation.
+
+ rvm install ree
+
+ rvm use ree
+
+Now to set REE as your default ruby:
+
+ rvm --default ree
+
+If you type ruby -v in the console you should see something resembling:
+
+ ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02
+
+##JRuby
+
+I thought it might be helpful to post how to install JRuby as well. It's only a couple of simple commands after all.
+
+ sudo apt-get install openjdk-6-dbg openjdk-6-jdk default-jre default-jdk
+
+Some possible extra's, I went ahead and installed them anyways.
+
+ sudo apt-get install libaccess-bridge-java libaccess-bridge-java-jni libxt-dev openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib tzdata-java default-jre-headless ca-certificates-java
+
+Now if you type java -version in the console you should see:
+
+ java version "1.6.0_18"
+ OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-4ubuntu3)
+ OpenJDK Server VM (build 16.0-b13, mixed mode)
+
+You're also going to want to install Apache's ANT
+
+ sudo apt-get install ant
+
+And if you type ant -version:
+
+ Apache Ant version 1.7.1 compiled on July 1 2010
+
+Now to use rvm and install jruby
+
+ rvm install jruby
+ rvm use jruby
+
+If you type ruby -v in the console you should see:
+
+ jruby 1.5.1 (ruby 1.8.7 patchlevel 249) (2010-06-06 f3a3480) (OpenJDK Client VM 1.6.0_18) [i386-java]
+
+And now you should have a functional development environment for ruby and jruby.
+
+##More Information
+
+*[Official Ruby homepage](http://www.ruby-lang.org/en/)
+*[Ruby Version Manager (rvm)](http://rvm.beginrescueend.com/)
+*[Ruby Enterprise Edition](http://www.rubyenterpriseedition.com/)
+*[OpenJDK](http://openjdk.java.net/)
+*[JRuby](http://jruby.org/)
+*[Samvel Stepanyan](http://stepanyan.wordpress.com/2010/08/02/setting-up-rvm-ruby-version-manager-on-ubuntu-10-04-lts/)
+*[Web2Linux](http://web2linux.com/installing-rails-3-on-ubuntu-10-04-lucid-lynx/)
+*[object : literal](http://objectliteral.blogspot.com/2010/03/rvm-notes.html)
+
Please sign in to comment.
Something went wrong with that request. Please try again.