0

I'm using Vagrant with Chef-solo to create a dev environment VM. Problem is, the Debian Chef package depends on a certain version of RubyGems to run, but I want the VM to have a much newer installed-from-source RubyGems version.

Is there a way in Vagrant to run some scripts/commands before Chef-solo is invoked and does its thing? That way I can switch the symlinks between the rubygems versions before and after Chef-solo has run.

1

What 'debian chef package'? The one from Opscode's apt repository? Or is something built into the basebox you're using?

You could probably use the shell script provisioner in vagrant to do this. However, I would build my own base box. "Veewee" is an excellent tool for doing this very quickly (relatively, takes about 15-20 mins).

0

The easiest way would be to use the default Ruby that's installed in the image to run chef, and install Ruby and RubyGems with chef, maybe managed by something like rbenv or rvm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.