-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nokogiri install error on Mac OSX Mavericks #267
Comments
Maybe try setting explicit ruby version in
http://stackoverflow.com/questions/19305801/gem-install-error-ruby-version-1-9-3-required Are you using rvm? Posting your Gemfile might help as well. Lastly you can downgrade nokogiri and see if that works:
Then try |
Thanks @plusjade I have a problem with my Ruby installation because when I try to add ruby '2.0' the console respond: $ bundle install
Your Ruby version is 1.8.7, but your Gemfile specified 2.0 And my ruby version is: $ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13] I've installed ruby by Homebrew and if I try again: $ brew install ruby
Warning: ruby-2.0.0-p353 already installed |
On Mavericks here too. For what it's worth, I just experienced this:
Now, I installed the bundle gem on the system config and repeated my attempt:
Seems to have worked both ways? RVM sucks, but having to install everything into |
My results agree with @dminkovsky. Looks like it's a system-ruby specific issue? $ rbenv version
2.1.0 (set by /usr/local/opt/rbenv/version)
$ mkdir ruhoh-test && cd ruhoh-test
~/Projects/ruhoh-test
$ echo "source 'https://rubygems.org'\n\ngem 'ruhoh'" >> Gemfile
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Installing directory_watcher (1.4.1)
Installing mini_portile (0.5.2)
Installing mustache (0.99.5)
Installing nokogiri (1.6.1)
Installing rack (1.5.2)
Installing redcarpet (2.3.0)
Installing ruhoh (2.6)
Using bundler (1.5.1)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed. |
Had the same issue--the following worked for me as well:
|
what about for those using rbenv ? I'm having nokogiri issues as well when bundling. Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/garytsai/.rbenv/versions/2.2.1/bin/ruby -r ./siteconf20150314-10362-br021k.rb extconf.rb --with-iconv-dir=/usr/local/Cellar/libiconv/1.14/
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin14.1.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin14.1.0/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin14.1.0/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... ERROR, review '/Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.1/ext/nokogiri/tmp/x86_64-apple-darwin14.1.0/ports/libxslt/1.1.26/configure.log' to see what happened.
*** 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/garytsai/.rbenv/versions/2.2.1/bin/$(RUBY_BASE_NAME)
/Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:279:in `block in execute': Failed to complete configure task (RuntimeError)
from /Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:271:in `chdir'
from /Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:271:in `execute'
from /Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:66:in `configure'
from /Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/lib/mini_portile.rb:109:in `cook'
from extconf.rb:101:in `block in <main>'
from extconf.rb:131:in `call'
from extconf.rb:131:in `block in <main>'
from extconf.rb:122:in `tap'
from extconf.rb:122:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.1 for inspection.
Results logged to /Users/garytsai/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/nokogiri-1.6.1/gem_make.out
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling. |
Hey @gary1410 , I've had a very similar issue and have been trying to fix it for days. In the end what worked for me was installing full xcode, previously I had only the command line tools. After I had it installed doing |
I also had a similar issue on the current Yosemite Beta with up to date Xcode. In my case it occurred when running The big hint was this error:
|
@mikecamilleri my case wasn't iconv at all. The error happened when compiling libxslt. The first time because of ggrep missing. After I fixed that it was saying it couldn't create the Makefile. |
For anyone who has arrived here with the same problem. I reinstalled OS X Yosemite a week ago and just tried to install Nokogiri again as part of the |
Because this issue is still open, and in case it helps anyone, I'm going to mention that I just tried to install Nokogiri 1.6.6.2 on a fresh OS X El Capitan install with Xcode installed. Again, it failed with
until I ran |
I know this is an old issue, but I'm leaving this here in case it is useful to someone. Same problem; same solution on a clean install of MacOS Sierra. It seems there is something about the command line tools installed by the XCode GUI that the Nokogiri installation script doesn't like.
|
Hi all,
I have an issue when I try bundle install:
So I tried:
My ruby version:
Thanks for your help.
The text was updated successfully, but these errors were encountered: