RVM::FW

Exposing hidden Rubies for firewalled RVMs

Using rbenv with RVM::FW

rbenv is an alternative environment manager to RVM. It is a less intrusive environment manager and is intended to be used as a single-user environment manager.

Installing rbenv

wget -O rbenv-5b9e4f05846f6bd03b09b8572142f53fd7a46e62.tar.gz http://rvm-fw.herokuapp.com/rubies/packages/rbenv/rbenv-5b9e4f05846f6bd03b09b8572142f53fd7a46e62.tar.gz
tar xzvf rbenv-5b9e4f05846f6bd03b09b8572142f53fd7a46e62.tar.gz
mv rbenv-5b9e4f05846f6bd03b09b8572142f53fd7a46e62 ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
# Restart terminal / shell session
type rbenv

Installing ruby-build

ruby-build is a project to build rubies that works as an rbenv plugin.

mkdir ~/.rbenv/plugins
wget -O ruby-build-e932d47195d76d6be9635a012056069e794039e0.tar.gz http://rvm-fw.herokuapp.com/rubies/packages/rbenv/ruby-build-e932d47195d76d6be9635a012056069e794039e0.tar.gz
tar xzvf ruby-build-e932d47195d76d6be9635a012056069e794039e0.tar.gz
mv ruby-build-e932d47195d76d6be9635a012056069e794039e0 ~/.rbenv/plugins/ruby-build

Installing Rubies with rbenv

The easiest way to install RVM::FW Rubies with rbenv is to download the ruby file into the rbenv cache directory and let rbenv install from the cache, like so:

# Create the default cache directory that ruby-build uses with rbenv
mkdir -p ~/.rbenv/cache
# Download the ruby you want into the cache directory:
wget http://rvm-fw.herokuapp.com/rubies/ruby-lang/2.2/ruby-2.2.2.tar.bz2 -O ~/.rbenv/cache/ruby-2.2.2.tar.bz2
 
# If you're installing an MRI ruby be sure to modify the config file to reflect the RVM::FW bz2 format:
# e.g., edit the file: $HOME/.rbenv/plugins/ruby-build/share/ruby-build/2.2.2
install_package "ruby-2.2.2" "http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.bz2" ldflags_dirs standard verify_openssl
 
# Then install the appropriate ruby with:
rbenv install 2.2.2