RVM ruby 1.9.3 installation for Ubuntu
rvm ruby installation for Ubuntu
In this article I will explain how you can get RVM (Ruby Version Manager) installed on Ubuntu 12.04 Linux. First we have to make sure that we have some dependencies installed, so run the following command to take care of them.
build-essential
$ sudo apt-get install build-essential
Informational list of build-essential packages
If you do not plan to build Debian packages, you don't need this package. Starting with dpkg (>= 1.14.18) this package is required for building Debian packages.
This package contains an informational list of packages which are considered essential for building Debian packages. This package also depends on the packages on that list, to make it easy to have the build-essential packages installed.
If you have this package installed, you only need to install whatever a package specifies as its build-time dependencies to build the package. Conversely, if you are determining what your package needs to build-depend on, you can always leave out the packages this package depends on.
https://packages.debian.org/sid/build-essential
CURL
$ sudo apt-get install curl
$ sudo apt-get install zlib1g-dev libreadline-dev libssl-dev libxml2-dev
libreadline-dev
The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.
cnswww.cns.cwru.edu/php/chet/readline/rltop.html
libxml2-dev
XML is a metalanguage to let you design your own markup language. A regular markup language defines a way to describe information in a certain class of documents (eg HTML). XML lets you define your own customized markup languages for many classes of document. It can do this because it's written in SGML, the international standard metalanguage for markup languages. Install this package if you wish to develop your own programs using the GNOME XML library.
zlib1g-dev
zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files.libssl-dev
libssl and libcrypto development libraries, header files and manpages.It is part of the OpenSSL implementation of SSL.
To start the RVM installation run the following command
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Now we need to add a line to our bashrc file so run the following command
$ [[ -s "/home/ignitemindz/.rvm/scripts/rvm" ]] && source "/home/ignitemindz/.rvm/scripts/rvm"
Make sure to replace ignitemindz with your user name in the above command so that you will not have any issues on your system. Now run
$ source ~/.bashrc
When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc.
To test if our installation of RVM was succesfull, we can run a command and check its output.
$ type rvm | head -1
If the output of the above command is equivalent to rvm is a function, then we now have a working RVM installation. Now our Ruby Version Manager is installed and we can go ahead and install the Ruby version 1.9.3 using the following command
$ rvm install 1.9.3
To make the Ruby version 1.9.3 the default one we run
$ rvm
use
--
default
1.9.3