Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# Install rbenv
# https://github.com/sstephenson/rbenv
cd ~
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev \
libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev -y
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.0
# Install shims for all Ruby binaries
rbenv rehash
# Set default Ruby version
rbenv global 2.1.0
# Check Ruby
ruby -v # => ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
# Check OpenSSL
irb
require 'openssl' # => true
# install rehash gem
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
gem install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment