Skip to content

Webapp: An error occured while installing json

Exec[bundler_update] fails on canvasback (cdev webapp):

   - [canvasback] err: /Stage[main]/Site_webapp/Exec[bundler_update]/returns: change from notrun to 0 failed: /bin/bash -c "/usr/bin/bundle check || /usr/bin/bundle install --path vendor/bundle --without test development" returned 5 instead of one of [0] at /srv/leap/puppet/modules/site_webapp/manifests/init.pp:60

trying to debug using the cmd that puppet runs for Exec[bundler_update] shows this:

root@canvasback:/srv/leap/webapp# sudo -u leap-webapp /bin/bash -c "/usr/bin/bundle check || /usr/bin/bundle install --path vendor/bundle --without test development"
git://github.com/cchandler/certificate_authority.git (at master) is not checked out. Please run `bundle install`
Updating git://github.com/cchandler/certificate_authority.git
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Fetching gem metadata from http://rubygems.org/..
Using rake (10.1.0) 
Using SyslogLogger (2.0) 
Using i18n (0.6.5) 
Using multi_json (1.8.1) 
Using activesupport (3.2.14) 
Using builder (3.0.4) 
Using activemodel (3.2.14) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.2) 
Using actionpack (3.2.14) 
Using mime-types (1.25) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.14) 
Using arel (3.0.2) 
Using tzinfo (0.3.37) 
Using activerecord (3.2.14) 
Using activeresource (3.2.14) 
Using bootstrap-sass (2.1.1.0) 
Using rack-ssl (1.3.3) 
Installing json (1.8.0) with native extensions 
Gem::Installer::ExtensionBuildError: 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:in `require'
	from extconf.rb:1:in `'


Gem files will remain installed in /srv/leap/webapp/vendor/bundle/ruby/1.9.1/gems/json-1.8.0 for inspection.
Results logged to /srv/leap/webapp/vendor/bundle/ruby/1.9.1/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
An error occured while installing json (1.8.0), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.0'` succeeds before bundling.

(from redmine: created on 2013-10-08, closed on 2013-10-10, relates #4079 (closed), relates #4090 (closed), relates #3960 (closed))