cmckni3
12/12/2012 - 11:31 PM

install rbenv on a Linux/Mac account

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 

# 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
#!/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