Error while installing nokogiri on an island machine

222 views
Skip to first unread message

Abhishek

unread,
Nov 30, 2011, 8:16:23 PM11/30/11
to nokogiri-talk
I am attempting to install nokogiri on a machine that is not connected
to the internet.

I downloaded the nokogiri gem from rubyforge and ran the gem install
nokogiri command.

It didnt work, told me to install devkit. I did install devkit
followed all the steps mentioned. It also failed told me i didnt have
rdiscount gem. I got that and installed that on my machine after which
devkit installed successfully.

Now when i tried again to install nokogiri it gave me the below error
and i downloaded libxml2 unfortunately i do not know how and where to
install it.

Any one have solution to this problem?

If i am able to successfully use nokogiri in my tool for xml parsing
then it will be have to be installed on all the machines, so a simple
method would be really helpful.

-Abhishek

C:\Ruby193>cd lib

C:\Ruby193\lib>gem install nokogiri
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

C:/Ruby193/bin/ruby.exe extconf.rb
extconf.rb:10: Use RbConfig instead of obsolete and deprecated Config.
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=C:/Ruby193/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:/Ruby193/lib/ruby/gems/1.9.1/gems/
nokogiri-
1.5.0 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/nokogiri-1.5.0/
ext/nokogir
i/gem_make.out

C:\Ruby193\lib>

Mike Dalessio

unread,
Dec 1, 2011, 10:22:58 AM12/1/11
to nokogi...@googlegroups.com
Hello,


On Wed, Nov 30, 2011 at 8:16 PM, Abhishek <abhis...@gmail.com> wrote:
I am attempting to install nokogiri on a machine that is not connected
to the internet.

I downloaded the nokogiri gem from rubyforge and ran the gem install
nokogiri command.

Please make sure you've downloaded the correct gem file -- the one for the windows platform. Team Nokogiri has cleverly embedded a precompiled version of libxml2 in that gem!


Good luck!

---
mike dalessio / @flavorjones

Abhishek

unread,
Dec 1, 2011, 5:44:58 PM12/1/11
to nokogiri-talk
Thanks Mike. This worked for me...I guess i was using the wrong gem.

Next thing on my check list to make a setup program that sets up my
execution environment on its own...

Thanks again.

-Abhishek

On Dec 1, 11:22 am, Mike Dalessio <mike.dales...@gmail.com> wrote:
> Hello,
>

Jonathan Rochkind

unread,
Dec 1, 2011, 5:49:49 PM12/1/11
to nokogi...@googlegroups.com, Abhishek
On 12/1/2011 5:44 PM, Abhishek wrote:
> Thanks Mike. This worked for me...I guess i was using the wrong gem.
>
> Next thing on my check list to make a setup program that sets up my
> execution environment on its own...

If you're not using bundler, it's highly recommended for setting up the
gem portion of your execution environment, you don't need to re-invent
that part.

Ankur

unread,
Dec 4, 2011, 10:35:49 AM12/4/11
to nokogiri-talk
If you are using bundler (highly recommended, you can also use with
Rails 2). You can have bundler keep your gems in a cache, then when
you goto a new machine without internet you can: bundle install --
local . You can even cache bundler for it to bootstrap (separate from
that cache, unless they changed it)
Reply all
Reply to author
Forward
0 new messages