Skip to content

Instantly share code, notes, and snippets.

@ynnadrules
Last active August 29, 2015 14:11
Show Gist options
  • Save ynnadrules/2d9ebdaba35d782a8c27 to your computer and use it in GitHub Desktop.
Save ynnadrules/2d9ebdaba35d782a8c27 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"' >> .bashrc
echo 'eval "$(rbenv init -)"' >> .bashrc
# reload .bashrc
source ~/.bashrc
# install ruby-build
# https://github.com/sstephenson/ruby-build
git clone git://github.com/sstephenson/ruby-build.git .ruby-build
cd .ruby-build
sudo ./install.sh
# list available ruby versions
ruby-build --definitions
# install ruby
rbenv install 2.1.5
# Install shims for all Ruby binaries
rbenv rehash
# Set default Ruby version
rbenv global 2.1.5
# Check Ruby
ruby -v # => ruby 2.1.5p### recent [x86_64-linux]
# Check OpenSSL
irb
require 'openssl' # => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment