Skip to content

Instantly share code, notes, and snippets.

@soupmatt
Created May 24, 2011 20:47
Show Gist options
  • Save soupmatt/989630 to your computer and use it in GitHub Desktop.
Save soupmatt/989630 to your computer and use it in GitHub Desktop.
Sick of how long bundle install takes, just to find out you don't need any new gems?
#!/bin/bash
bundle check
if [[ $? = 1 ]] ; then
bundle install $@
fi
@gus
Copy link

gus commented May 27, 2011

Yep. I had put this in the onscreen .rvmrc

gus@jaknowlden:mother[master]> cat apps/onscreen/.rvmrc

rvm --create ruby-1.8.7-p174@vibes-onscreen

# Install bundler and run it
type -p bundle &>/dev/null
if [[ $? -gt 0 ]]; then
  echo "Installing prerequisite gem, bundler"
  gem install --no-rdoc --no-ri bundler
fi

bundle check || bundle install

Besides the bundle check and install, the .rvmrc makes sure bundler is installed.

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