Error installing chef
So, originally I got all the way to the point (and all the installs had no errors) in the tutorial where you finally can git push heroku master but the problem was that in heroku it never showed a web dyno, just the postgresql DB.
This happened b4 the forum was up, so I thought I would try to start all over again by unzipping the VM in a totally different folder and going through the tutorial again. Now thought, when I try to run VAGRANT UP I get this error:
stdin: is not a tty ERROR: Error installing chef: ERROR: Failed to build gem native extension.
/opt/vagrant_ruby/bin/ruby extconf.rb
creating Makefile
make sh: 1: make: not found
Gem files will remain installed in /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/json-1.7.6 for inspection. Results logged to /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/json-1.7.6/ext/json/ext/generator/gem_make.out Building native extensions. This could take a while... The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!
chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell
Any idea what's going on?
PS Thanks so much for doing this tutorial!
Answers
I add the following error that I resolved by doing: sudo aptitude install ruby1.9.1-dev sudo gem install --no-ri --no-rdoc chef
Maybe it will help.
Building native extensions. This could take a while... ERROR: Error installing chef: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from extconf.rb:1:in `
Gem files will remain installed in /var/lib/gems/1.9.1/gems/yajl-ruby-1.1.0 for inspection. Results logged to /var/lib/gems/1.9.1/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out
As the message is saying "make: not found" the "make" program is not installed yet. After booting up Vagrant tries to install "chef" and execute the command "gem install --no-ri --no-rdoc chef" (see Vagarantfile), but to be able to do this "gem" needs to have "make" installed already, which is not.
On my Vagrant file I have commented out the line: config.vm.provision :shell, :inline => "gem install --no-ri --no-rdoc chef", as "chef" is already installed when provisioning with a "precise64" ubuntu machine.
Was worked flawlessly !
I'm now running into this error myself, just when I put in the command 'vagrant up'. Have you come across any solution?
This is because make is not installed in the guest vm.
I ran into the same issue as well and I added the following to the VagrantFile
config.vm.provision :shell, :inline => "sudo aptitude -y install build-essential"
This will install the build-essential package which will install make as well.
I added the line just before the call to the rub gem is done . So above the following line
Upgrade Chef automatically
config.vm.provision :shell, :inline => "gem install --no-ri --no-rdoc chef"