Gem Commands with Nokogiri

F

flebber

I am on windows XP.

trying to install nokogiri. I have the devkit installed.

I received the error below. So I am trying to use the commands based
on its output but they are erroring for me as well.

PS C:\devkit> gem install nokogiri --with-xml2-lib --with-xslt-lib --
platform=ruby
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --with-xml2-lib
PS C:\devkit> gem install nokogiri --with-xml2-include --with-xslt-
include --platform=ruby
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --with-xml2-include
PS C:\devkit> gem install xml2 --platform=ruby
ERROR: Could not find a valid gem 'xml2' (>= 0) in any repository
PS C:\devkit> gem install nokogiri --with-libxml2-include --with-
libxslt-include --platform=ruby
ERROR: While executing gem ... (OptionParser::InvalidOption)
invalid option: --with-libxml2-include
PS C:\devkit>


PS C:\devkit> gem install rake nokogiri rails --platform=ruby
Temporarily enhancing PATH to include DevKit...
Successfully installed rake-0.8.7
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

C:/Ruby191/bin/ruby.exe extconf.rb
checking for libxml/parser.h... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html
for help with installing depend
encies.
-----
*** 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=C:/Ruby191/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


Gem files will remain installed in C:/Ruby191/lib/ruby/gems/1.9.1/gems/
nokogiri-1.4.3.1 for inspection.
Results logged to C:/Ruby191/lib/ruby/gems/1.9.1/gems/nokogiri-1.4.3.1/
ext/nokogiri/gem_make.out
 
L

Luis Lavena

I am on windows XP.

trying to install nokogiri. I have the devkit installed.

I received the error below. So I am trying to use the commands based
on its output but they are erroring for me as well.

Nokogiri already provides binaries for RubyInstaller precisely to
avoid the compilation problems.

https://rubygems.org/gems/nokogiri
PS C:\devkit> gem install nokogiri --with-xml2-lib --with-xslt-lib --
platform=ruby
ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --with-xml2-lib
PS C:\devkit> gem install nokogiri --with-xml2-include --with-xslt-
include --platform=ruby
ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --with-xml2-include
PS C:\devkit> gem install xml2 --platform=ruby

If you want to supply options to the gem compilation process, you to
do that after --:

gem install foo -- --with-my-lib

Also note that you need libxml2 headers and libraries to compile
against.

On a second comment, seems you're using PowerShell. Batch files that
modify the PATH might not work as expected inside PowerShell.
libxml2 is missing.  please visithttp://nokogiri.org/tutorials/installing_nokogiri.html
for help with installing depend
encies.

If you check the installation instructions for Windows, it has already
provided a binary for it so you don't need to compile it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top