Skip to content

Instantly share code, notes, and snippets.

@cmckni3
Last active October 13, 2015 23:27
Show Gist options
  • Save cmckni3/4272681 to your computer and use it in GitHub Desktop.
Save cmckni3/4272681 to your computer and use it in GitHub Desktop.
install rbenv on a Linux/Mac account
#!/usr/bin/bash
# Clone rbenv and set it up to build versions of ruby
git clone git://github.com/sstephenson/rbenv.git .rbenv
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git
# Optional
# git clone git://github.com/jamis/rbenv-gemset.git
# Add rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
# Make sure we're using gcc on Mac
export CC=gcc
rbenv install 1.9.3-p545
rbenv global 1.9.3-p545
#!/usr/bin/bash
# Clone rbenv and set it up to build versions of ruby
git clone git://github.com/sstephenson/rbenv.git .rbenv
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git
# Optional
# git clone git://github.com/jamis/rbenv-gemset.git
# Add rbenv
# Will merge this gist with other one and make a zsh/bash option
# Also will make this optional
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source ~/.zshrc
# Make sure we're using gcc to compile on Mac
export CC=gcc
rbenv install 1.9.3-p545
rbenv global 1.9.3-p545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment