Permalink
Browse files

Force-feed the baby

Make sure chef is always installed, up-to-date and (hopefully) functional.
This fixes the famous "cannot find gem chef among []" issue we have been
observing for a couple of weeks now.
  • Loading branch information...
1 parent 1d66d52 commit 28941c2d6b2e07d7389f6fb811bb5c2b47cf44c0 @michaelklishin michaelklishin committed Nov 3, 2012
Showing with 14 additions and 7 deletions.
  1. +14 −7 Vagrantfile
View
@@ -30,18 +30,25 @@ Vagrant::Config.run do |c|
box.vm.forward_port(22, 3340 + num, :name => "ssh")
box.vm.customize [
- "modifyvm", :id,
- "--memory", config.memory.to_s,
- "--name", "#{full_name}-base",
- "--nictype1", "Am79C973",
- "--cpus", "2",
- "--ioapic", "on"
- ]
+ "modifyvm", :id,
+ "--memory", config.memory.to_s,
+ "--name", "#{full_name}-base",
+ "--nictype1", "Am79C973",
+ "--cpus", "2",
+ "--ioapic", "on"
+ ]
+
+ config.vm.provision :shell do |sh|
+ sh.inline = <<-EOF
+ /opt/ruby/bin/gem install chef --no-ri --no-rdoc --no-user-install
+ EOF
+ end
if config.recipes? && File.directory?(config.cookbooks)
box.vm.provision :chef_solo do |chef|
chef.cookbooks_path = config.cookbooks
chef.log_level = :debug # config.log_level
+ chef.binary_path = "/opt/ruby/bin/"
config.recipes.each do |recipe|
chef.add_recipe(recipe)

0 comments on commit 28941c2

Please sign in to comment.