Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
On Debian, Ubuntu, or Mint: install Ruby 2.3.1 with chruby and ruby-build, ruby-install, and gem_home
# Install apt-get packages:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
# Install chruby:
cd
wget https://github.com/downloads/postmodern/chruby/chruby-0.3.9.tar.gz
tar -xzvf chruby-0.3.9.tar.gz
cd chruby-0.2.3
sudo make install
# Install ruby-install:
cd
wget -O ruby-install-0.6.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.6.0.tar.gz
tar -xzvf ruby-install-0.6.0.tar.gz
cd ruby-install-0.6.0/
sudo make install
# Install ruby-build:
cd
git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build
sudo ./install.sh
# Install gem_home:
# Install 2.3.1 with OpenSSL:
ruby-build 2.3.1 ~/usr/local/2.3.1 --with-openssl-dir=`which openssl`
# Add the following to .bashrc (or .zshrc whatev):
. /usr/local/share/chruby/chruby.sh # Load chruby
RUBIES=(
~/usr/local/2.3.1
# Path to other Rubies here...
)
chruby 2.3.1 # Select default Ruby
# Close and reopen terminal.
chruby
#=> * 2.3.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.