Blog

Installing Ruby Version Manager in Offline Mode

August 20, 2014 Blog 0 Comment

Thought I’d share these notes. The guides out there in the wild have gained a few holes in them since they were written.

Heads up for anyone planning on following this to a T:

  • This is on RHEL6.5
  • Despite this being offline mode, I’m going to use yum to download RVM dependencies. Cache those RPMs and use localinstall if you need a “true” offline installation.
  • I recommend adding EPEL to your OS’s list of repos. It should take care of most of the harder-to-find ones.

First, download a stable release of RVM in tarball form.
$ curl -sSL https://github.com/wayneeseguin/rvm/tarball/stable -o rvm-stable.tar
Download Ruby 2.1.2 (MUST BE A tar.bz2 file) and Rubygems 2.4.1 (in tgz) and move them into the same working directory as your rvm tarball. Let’s install
$ mkdir rvm && cd rvm
$ tar --strip-components=1 -xzf ../rvm-stable.tar
$ ./install --auto-dotfiles
$ source ~/.rvm/scripts/rvm
$ cd ..

Now let’s move the software into rvm’s install space
$ cp ruby-2.1.2.tar.bz2 $rvm_path/archives/
$ cp rubygems-2.4.1.tgz $rvm_path/archives/

Install our prerequisites from yum (this list may be incomplete)
$ sudo yum install gcc autoconf gcc-c++ readline-devel zlib-devel openssl-devel automake libtool bison libyaml libyaml-devel libffidevel
Install Ruby with RVM. These options will not try to verify the binaries over the internets.
$ rvm --verify-downloads 2 --disable-binary install 2.1.2 --rubygems 2.4.1
And set our default version.
$ rvm use 2.1.2 --default

Leave a Comment