Skip to content

Instantly share code, notes, and snippets.

@thomasguillory
Last active January 3, 2016 08:39
Show Gist options
  • Save thomasguillory/8437338 to your computer and use it in GitHub Desktop.
Save thomasguillory/8437338 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Update rbenv
cd ~/.rbenv/plugins/ruby-build/
git pull
# Install ruby 2.1.0
rbenv install 2.1.0
# Make ruby 2.1.0 default
rbenv global 2.1.0
# Install at least bundler
gem install bundler
# you may need other gems globally installed, but altagem needs only bundler
rbenv rehash
# Update project
git fetch
git checkout master
git merge origin/master
bundle install
# NB: while waiting the PR to be merged in master, the project will not work under 2.1.0
# So you should create a .ruby-version file containing your current ruby version to continue working
echo "2.0.0-p353" >> .ruby-version
@MaximeD
Copy link

MaximeD commented Jan 15, 2014

no need for any rbenv rehash? you were lucky :)

@thomasguillory
Copy link
Author

Because I'm lazy and I've installed days ago a little plugin named rbenv-gem-rehash ;)

@thomasguillory
Copy link
Author

Updated

@MaximeD
Copy link

MaximeD commented Jan 16, 2014

nice, I did not know about this plugin :]

@mfaust35
Copy link

why git fetch + checkout master + merge origin/master after git pull ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment