Reputation: 133
Today I wanted to boot up my virtual Ubuntu 14.04 server using vagrant and chef. Just like in every good developer story, it was working perfectly the day before, so my assumption was it would once again. However this is not what reality threw at me.
==> default: stdin: is not a tty
==> default: ERROR: While executing gem ... (Gem::DependencyError)
==> default: Unable to resolve dependencies: ohai requires mime-types (~> 2.0); rest-client requires mime-types (~> 1.16)
It hasn't done this before and I'm baffled as to what it could be. I have checked the VM's internet connection and it is sound.
99.999% of the Vagrant and chef scripts were made by somebody else and I must admit my knowledge of Chef and especially Ruby is slightly limited. I did not change anything in the scripts. The only thing that DID happen is that my machine gobbled up so much RAM overnight that it became impossible to work on. So I had to reset the machine.
Upvotes: 2
Views: 390
Reputation: 24541
I hit this problem with chef 10.28.0. The problem is chef asks for these dependencies:
ohai >= 0.6.0
rest-client < 1.7.0, >= 1.0.4
So gem uses the latest version of ohai it can find, which winds up being new, and breaking everything.
You can fix it by removing ohai, then installing an older version, like this:
gem install ohai -v 7.2.0
Then it should work!
If you ever hit something like this again, rubygems.org is a good place to find out what dependencies things are asking for.
Upvotes: 1