Skip to content

Instantly share code, notes, and snippets.

@dosire
Created July 14, 2010 12:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dosire/475358 to your computer and use it in GitHub Desktop.
Save dosire/475358 to your computer and use it in GitHub Desktop.
#!/bin/bash
# This file is available publicly online on http://gist.github.com/475358
# Use the raw link to download
if [ "`gem -v`" != "1.3.6" ]; then
sudo apt-get remove rubygems rubygems1.8 -y;
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.6.tgz;
tar -xvzf rubygems-1.3.6.tgz;
sudo ruby rubygems-1.3.6/setup.rb;
sudo ln -sfv /usr/bin/gem1.8 /usr/bin/gem
fi
if [ "`chef-solo -v`" != "Chef: 0.8.16" ]; then
sudo gem uninstall -x -a chef;
sudo gem uninstall -x -a ohai;
sudo gem uninstall -x -a json;
sudo gem install json --version=1.4.2 --no-rdoc --no-ri
sudo gem install ohai --version=0.5.6 --no-rdoc --no-ri
sudo gem install chef --version=0.8.16 --no-rdoc --no-ri
fi
if [ "`gem which chef-deploy`" != "/usr/lib/ruby/gems/1.8/gems/chef-deploy-0.2.5/lib/chef-deploy.rb" ]; then
sudo gem uninstall -x chef-deploy;
sudo gem install chef-deploy --version=0.2.5 --no-rdoc --no-ri
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment