Created
April 17, 2012 15:51
-
-
Save ngauthier/2407031 to your computer and use it in GitHub Desktop.
ubuntu ruby with brightbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# only bundler will be installed here | |
export GEM_HOME=/home/nick/.gems | |
# run this for new projects to put the gems and bins in the directory | |
alias bundle-bootstrap="bundle install --binstubs=.bundle/bin --path=.bundle/gems" | |
# switch to ruby 1.8 | |
switch-ruby-1.8 () | |
{ | |
sudo update-alternatives --set ruby /usr/bin/ruby1.8 | |
sudo update-alternatives --set gem /usr/bin/gem1.8 | |
gem install bundler | |
} | |
export -f switch-ruby-1.8 | |
# switch to ruby 1.9 | |
switch-ruby-1.9.1 () | |
{ | |
sudo update-alternatives --set ruby /usr/bin/ruby1.9.1 | |
sudo update-alternatives --set gem /usr/bin/gem1.9.1 | |
gem install bundler | |
} | |
export -f switch-ruby-1.9.1 | |
# have to re-install bundler to use the current ruby | |
# you could also use: | |
# ruby-switch --set ruby1.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-add-repository ppa:brightbox/ruby-ng-experimental | |
sudo apt-get update | |
sudo apt-get install ruby rubygems ruby-switch | |
sudo apt-get install ruby1.9.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment