Skip to content

Instantly share code, notes, and snippets.

@WarFox
Created October 4, 2014 21:52
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 WarFox/05f833a3d421452d9bf2 to your computer and use it in GitHub Desktop.
Save WarFox/05f833a3d421452d9bf2 to your computer and use it in GitHub Desktop.
Inital setup of Ruby using rbenv and ruby-build
#!/bin/bash
# https://gorails.com/deploy/ubuntu/14.04
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv &
wait # wait for cloning to finish
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build &
wait # wait for cloning to finish
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.1.3
rbenv global 2.1.3
ruby -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment