Skip to content

Instantly share code, notes, and snippets.

@acook
Last active September 28, 2015 04:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acook/51a15535e0b74265c30a to your computer and use it in GitHub Desktop.
Save acook/51a15535e0b74265c30a to your computer and use it in GitHub Desktop.
The process to get a full working rbenv setup.
export RBENV_ROOT="$HOME/.rbenv"
export RBENV_PLUGINS="$RBENV_ROOT/plugins"
git clone https://github.com/sstephenson/rbenv.git "$RBENV_ROOT"
export PATH="$RBENV_ROOT/bin:$PATH"
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> ~/.bash_profile
eval "$(rbenv init -)"
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
cat << EOF > $RBENV_ROOT/default-gems
gem-browse
pry
pry-doc
pry-theme
pry-coolline
pry-byebug
pry-toys
pry-inline
pry-state
bundler
rubygems-bundler
EOF
mkdir -p $RBENV_PLUGINS
git clone https://github.com/sstephenson/rbenv-gem-rehash.git $RBENV_PLUGINS/rbenv-gem-rehash
git clone https://github.com/sstephenson/ruby-build.git $RBENV_PLUGINS/ruby-build
git clone https://github.com/sstephenson/rbenv-default-gems.git $RBENV_PLUGINS/rbenv-default-gems
git clone https://github.com/rkh/rbenv-update.git $RBENV_PLUGINS/rbenv-update
git clone https://github.com/rkh/rbenv-whatis.git $RBENV_PLUGINS/rbenv-whatis
git clone https://github.com/rkh/rbenv-use.git $RBENV_PLUGINS/rbenv-use
git clone https://github.com/tpope/rbenv-aliases.git $RBENV_PLUGINS/rbenv-aliases
git clone https://github.com/tpope/rbenv-communal-gems.git $RBENV_PLUGINS/rbenv-communal-gems
git clone https://github.com/nicknovitski/rbenv-gem-update $RBENV_PLUGINS/rbenv-gem-update
#git clone https://github.com/jf/rbenv-gemset.git $RBENV_PLUGINS/rbenv-gemset
# OSX: xcode-select --install
# OSX: brew install openssl libyaml libffi
# Linux: apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev \
# Linux: libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
rbenv update
rbenv install 2.2.3
rbenv alias --auto
rbenv use 2.2.3 --global
rbenv communize --all
gem regenerate_binstubs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment