Skip to content

Instantly share code, notes, and snippets.

@DAddYE
Created May 25, 2011 14:29
Show Gist options
  • Save DAddYE/991077 to your computer and use it in GitHub Desktop.
Save DAddYE/991077 to your computer and use it in GitHub Desktop.
Update Gems, Update RubyGems, Fix warnings.
#!/usr/bin/env bash
sudo gem update
yes | sudo gem clean
sudo gem update --system
if [ ! -f /usr/local/bin/brew ]
then
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
fi
if [ ! -f /usr/local/bin/gsed ]
then
brew install gnu-sed
fi
sudo gem pristine --all --no-extensions
gems=$(gem -v 2>&1 | grep called | gsed -r -e 's#^.*specifications/##' -e 's/-[0-9].*$//')
for gem in $gems
do
echo Fixing $gem...
sudo gem pristine $gem -- -build-arg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment