Skip to content

Latest commit

 

History

History
52 lines (43 loc) · 1.26 KB

Rbenv-Installation.md

File metadata and controls

52 lines (43 loc) · 1.26 KB

Rbenv

From https://github.com/sstephenson/rbenv:

Use rbenv to pick a Ruby version for your application and guarantee that your development environment matches production. Put rbenv to work with Bundler for painless Ruby upgrades and bulletproof deployments.

Pre-installation

Remove Apt package:

sudo apt-get remove rbenv ruby-bundler ruby-rvm

Install dependencies:

sudo apt-get install zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev \
					  libruby1.9.1 libreadline-dev git-core libnotify-dev \
					  libc6-dev libssl-dev libmysql++-dev libsqlite3-dev \
					  make build-essential libssl-dev libreadline6-dev \
					  libyaml-dev curl

Installation

Rbenv Installer

curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash

Set up shell environment

echo 'export RBENV_ROOT="$HOME/.rbenv"' >> ~/.bashrc
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bashrc
exec $SHELL

Define default-gems

cat > ~/.rbenv/default-gems <<"EOF"
bundler
rails
EOF

Installing Ruby version

rbenv install 2.0.0-p594

Setting default Ruby version

rbenv global 2.0.0-p594