Skip to content

Instantly share code, notes, and snippets.

@thogg4
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thogg4/a39af9e709efda6cfce3 to your computer and use it in GitHub Desktop.
Save thogg4/a39af9e709efda6cfce3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Install rbenv
# https://github.com/sstephenson/rbenv
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile
echo 'eval "$(rbenv init -)"' >> .bash_profile
# reload .bash_profile
source ~/.bash_profile
# install ruby-build
# https://github.com/sstephenson/ruby-build
git clone git://github.com/sstephenson/ruby-build.git
cd ruby-build
sudo ./install.sh
# list available ruby versions
ruby-build --definitions
# install ruby
rbenv install 2.1.2
# Install shims for all Ruby binaries
rbenv rehash
# Set default Ruby version
rbenv global 2.1.2
# Check Ruby
ruby -v # => ruby 2.1.2
# Check OpenSSL
irb
require 'openssl' # => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment