Search code examples
rubyrubygemschef-infrachef-recipe

Using chef-metal with Windows-7


I want to use chef-metal with on my windows workstation. Following are details of my setup : OS : Windows 7, 32-bit Chef client version : 11.12.0

I follow the instructions as mentioned here . I intend to use the Vagrant driver for chef-metal, so I have vagrant and virtualbox installed on my system. Next as the documentation says, I install 'chef-metal' gem, and then try to run the basic vagrant_linux and simple recipes. But the setup is giving me rubygems conflicts for gem 'ffi', the error is shown in the screenshot below : Apparently, installing chef-metal gem is messing up my chef-client installation also. If I run chef-client -v, just to check if chef-client is working fine, i throws the same gem conflict error.

enter image description here

While installation of chef-metal gem, I observe that it is installing certain gems, that are already installed on the system(with the chef-client installation.) I tried to uninstalling a version of the gem throwing the error(ffi-1.9.3-x86-mingw32), but it showed me this info:

enter image description here

Same is the response i get when i try to uninstall ffi-1.5.0-x86-mingw32 gem.

Update :

As per Tensibai's suggestions, I removed teh older version of the gem and updated to use a new one. Following is the new gem dependency error I get : enter image description here

Please help as I have reached a dead end on searching a solution for this one:


Solution

  • Gem documentation is HERE

    To uninstall it is gem uninstall ffi -v 1.5.0

    What the errors tells you is that it can't load it because ffi is in versino 1.5 and ohai require it in a version around 1.9.X (the ~> 1.9).

    You best bet to resolve the problem is to run a gem update ffi -v 1.9.3

    And update chef too to remove old depending: gem update chef