mardi 31 mars 2015

Error installing nokogiri gem with rbenv ruby 2.2.1

I'm trying to install a fresh nokogiri gem on a rails app like so:



gem install nokogiri -v '1.4.4'


I'm getting this error:



Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

/Users/development/.rbenv/versions/2.2.1/bin/ruby -r ./siteconf20150331-4057-14pcvq9.rb extconf.rb
*** 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=/Users/development/.rbenv/versions/2.2.1/bin/$(RUBY_BASE_NAME)
extconf.rb:10:in `<main>': uninitialized constant Config (NameError)

extconf failed, exit code 1

Gem files will remain installed in /Users/development/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/nokogiri-1.4.4 for inspection.
Results logged to /Users/development/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/nokogiri-1.4.4/gem_make.out


I'm using rebenv ruby 2.1.1, so this is in a gemset.


Also this might help, this is my brew list:



autoconf freexl gpp libpng lzlib postgis redis
automake gdal imagemagick libspatialite makedepend postgresql ruby-build
boost geoip jpeg libtiff mpfr proj s3cmd
cgal geos json-c libtool openssl qt sfcgal
cmake giflib libgeotiff libxml2 phantomjs rbenv sqlite
freetype gmp liblwgeom libxslt pkg-config readline xz


Thanks for your help, I could really do with this working, there's a lot of similar fixes online however none of them have fixed my issue.


Aucun commentaire:

Enregistrer un commentaire