Project

General

Profile

Bug #464

Updated by Daniel Curtis over 9 years ago

I encountered a problem while adding plugins to one redmine while running @bundle install@. 

 * Try to install plugins for redmine: 
 <pre> 
 cd /usr/local/www/redmine 
 bundle install --path vendor/bundle 
 </pre> 
 #* Resulted in: 
 <pre> 
 Building nokogiri using packaged libraries. 

 Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

         /usr/local/bin/ruby19 extconf.rb  
 Building nokogiri using packaged libraries. 
 ----- 
 libiconv is missing.    please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies. 
 ----- 
 *** extconf.rb failed *** 
 Could not create Makefile due to some reason, probably lack of 
 necessary libraries and/or headers.    Check the mkmf.log file for more 
 details.    You may need configuration options. 

 Provided configuration options: 
	 --with-opt-dir 
	 --without-opt-dir 
	 --with-opt-include 
	 --without-opt-include=${opt-dir}/include 
	 --with-opt-lib 
	 --without-opt-lib=${opt-dir}/lib 
	 --with-make-prog 
	 --without-make-prog 
	 --srcdir=. 
	 --curdir 
	 --ruby=/usr/local/bin/ruby19 
	 --help 
	 --clean 
	 --use-system-libraries 
	 --enable-static 
	 --disable-static 
	 --with-zlib-dir 
	 --without-zlib-dir 
	 --with-zlib-include 
	 --without-zlib-include=${zlib-dir}/include 
	 --with-zlib-lib 
	 --without-zlib-lib=${zlib-dir}/lib 
	 --enable-cross-build 
	 --disable-cross-build 


 Gem files will remain installed in /usr/local/www/redmine/vendor/bundle/ruby/1.9/gems/nokogiri-1.6.3.1 for inspection. 
 Results logged to /usr/local/www/redmine/vendor/bundle/ruby/1.9/gems/nokogiri-1.6.3.1/ext/nokogiri/gem_make.out 
 An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot 
 continue. 
 Make sure that `gem install nokogiri -v '1.6.3.1'` succeeds before bundling. 
 </pre> 

 * And when I went to install the gem directly, I received the above error. A similar problem was reported on StackOverflow on OSX, and the solution was to use the system libraries for building the nokogiri gem: 
 <pre> 
 gem install -v '1.6.3.1' -- --use-system-libraries 
 </pre> 

 That allowed the gem to be installed, however it did not fix the problem happening with bundler. 

 * Another member on StackOverflow mentioned altering the bundler config: 
 <pre> 
 bundle config build.nokogiri "--use-system-libraries" 
 </pre> 

 And that did the trick! 

 * Bundle install works again: 
 <pre> 
 bundle install --path vendor/bundle 
 </pre> 

 h2. Resources 

 * https://stackoverflow.com/questions/23668684/issue-installing-nokogiri-in-bundle-install

Back