Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Installing Nokogiri
Message
From
13/06/2011 15:34:09
 
 
To
All
General information
Forum:
Ruby on Rails
Category:
Installation, Setup and Configuration
Title:
Installing Nokogiri
Miscellaneous
Thread ID:
01514250
Message ID:
01514250
Views:
227
Hi,

I've been following the Ruby on Rails Tutorial here:

http://ruby.railstutorial.org/chapters/static-pages#top

When I set the Gemfile up like in Listing 3.1 and then do a "bundle install" I get the following:
$ bundle install
Fetching source index for http://rubygems.org/
which: no sudo in (/usr/local/bin:/usr/bin:/cygdrive/c/XAMPP/php:/cygdrive/c/WIN
DOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/
WINDOWS/system32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/system32/WindowsPowe
rShell/v1.0:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdr
ive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/c/Program Files/
Microsoft SQL Server/100/Tools/Binn/VSShell/Common7/IDE:/cygdrive/c/Program File
s/Microsoft Visual Studio 9.0/Common7/IDE/PrivateAssemblies:/cygdrive/c/Program
Files/Calibre2:/cygdrive/c/Program Files/QuickTime/QTSystem)
Using rake (0.9.2)
Using abstract (1.0.0)
Using activesupport (3.0.7)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.7)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.27)
Using actionpack (3.0.7)
Using mime-types (1.16)
Using polyglot (0.3.1)
Using treetop (1.4.9)
Using mail (2.2.19)
Using actionmailer (3.0.7)
Using arel (2.0.10)
Using activerecord (3.0.7)
Using activeresource (3.0.7)
Using bundler (1.0.14)
Using diff-lcs (1.1.2)
Installing nokogiri (1.4.4) with native extensions /usr/lib/ruby/site_ruby/1.8/r
ubygems/installer.rb:551:in `build_extensions': ERROR: Failed to build gem nativ
e extension. (Gem::Installer::ExtensionBuildError)

        /usr/bin/ruby.exe extconf.rb
checking for libxml/parser.h... no
-----
libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokog
iri.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/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


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.4 fo
r inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.4/ext/nokogiri/gem_ma
ke.out
        from /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:504:in `each'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:504:in `build_ext
ensions'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:180:in `install'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/source.rb:10
1:in `install'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/rubygems_int
egration.rb:279:in `preserve_paths'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/source.rb:91
:in `install'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/installer.rb
:58:in `run'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/rubygems_int
egration.rb:93:in `with_build_args'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/installer.rb
:57:in `run'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/spec_set.rb:
12:in `each'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/spec_set.rb:
12:in `each'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/installer.rb
:49:in `run'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/installer.rb
:8:in `install'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/cli.rb:222:i
n `install'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor/
task.rb:22:in `send'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor/
task.rb:22:in `run'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor/
invocation.rb:118:in `invoke_task'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor.
rb:246:in `dispatch'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor/
base.rb:389:in `start'
        from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/bin/bundle:13
        from /usr/bin/bundle:19:in `load'
        from /usr/bin/bundle:19
The mkmf.log:
find_header: checking for libxml/parser.h... -------------------- no

"gcc -E -I. -I/usr/lib/ruby/1.8/i386-cygwin -I. -I-I-I/opt/local/include -I-I-I/usr/local/include -I-I-I/usr/include -I-I-I/usr/include -I-I-I/usr/include/libxml2 -I/opt/local/include/libxml2 -I/usr/local/include/libxml2 -I-I/opt/local/include -I-I/usr/local/include -I-I/usr/include -I-I/usr/include -I-I/usr/include/libxml2 -I/opt/local/include -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/libxml2    -g -O2     -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline  conftest.c -o conftest.i"
conftest.c:1:27: libxml/parser.h: No such file or directory
checked program was:
/* begin */
1: #include <libxml/parser.h>
/* end */

--------------------
I've been looking at the various "solutions" to this but none seem to help me, in fact the nokogiri web site says that I shouldn't have any problems on Windows.

Any advice for this RoR newby?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Reply
Map
View

Click here to load this message in the networking platform