cjohansen / juicer

A command line tool for JavaScript and CSS developers
630 stars 47 forks source link

Installing on OSX fails #57

Closed markstar closed 12 years ago

markstar commented 12 years ago

I've been able to install juicer on Windows perfectly okay. However, it's not working on OSX. Even with the following command: sudo gem install juicer --include-dependencies

I get the following error:

INFO: gem install -y is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list Building native extensions. This could take a while... ERROR: Error installing juicer: ERROR: Failed to build gem native extension.

    /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

checking for libxml/parser.h... * 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 --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/markstar/.rvm/rubies/ruby-1.9.3-p194/bin/ruby --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-xslt-dir --without-xslt-dir --with-xslt-include --without-xslt-include=${xslt-dir}/include --with-xslt-lib --without-xslt-lib=${xslt-dir}/lib --with-libxslt-config --without-libxslt-config --with-pkg-config --without-pkg-config --with-libxml-2.0-config --without-libxml-2.0-config --with-pkg-config --without-pkg-config --with-libiconv-config --without-libiconv-config --with-pkg-config --without-pkg-config /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:intry_cpp' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:970:in block in find_header' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:inblock in checking_for' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block (2 levels) in postpone' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block in postpone' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in postpone' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:inchecking_for' from /Users/markstar/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:969:in find_header' from extconf.rb:114:in

'

Gem files will remain installed in /Users/markstar/.rvm/gems/ruby-1.9.3-p194/gems/nokogiri-1.5.5 for inspection. Results logged to /Users/markstar/.rvm/gems/ruby-1.9.3-p194/gems/nokogiri-1.5.5/ext/nokogiri/gem_make.out

cjohansen commented 12 years ago

Looks like the problem is with libxml, which Juicer depends on.

markstar commented 12 years ago

Thanks for getting back to me. So is this an issue with my version of libxml? Or is it a dependency that's missing? I used the --include-dependencies flag when installing so I would expect them all to be installed as part of the install process. Or is this not the case?

cjohansen commented 12 years ago

AFAICT, it's failing to build the libxml bindings because the development files (the header file listed in the error output) cannot be found. I have no idea how to solve it on a Mac. You can reproduce by simply trying gem install nokogiri

AlexSkrypnyk commented 12 years ago

Same issue with Ubuntu. Installing Nokogiri helped. http://nokogiri.org/tutorials/installing_nokogiri.html