Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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).

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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