Skip to content

Instantly share code, notes, and snippets.

@burdandrei
Created April 15, 2015 11:46
Show Gist options
  • Save burdandrei/025e377fd93673b06a7d to your computer and use it in GitHub Desktop.
Save burdandrei/025e377fd93673b06a7d to your computer and use it in GitHub Desktop.
Check that you got all the gems needed to trigger the ruby script
#!/bin/bash -e
#
# Wrapper to check all the needed gems are installed
GL=$(gem list)
for gem in $(cat Gemfile | grep -w gem | cut -f2 -d ' '| tr -d "'"); do
if ! $(echo $GL | grep -wq $gem); then
gem install bundler
bundle install
break
fi
done
###
# Run here any ruby you need and don't think about the dependencies
###
@bchmn
Copy link

bchmn commented Apr 15, 2015

😈

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