Posts Tagged ‘ Nokogiri

Error install nokogiri

Fetching: mini_portile-0.6.2.gem (100%)
Fetching: nokogiri- (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
	ERROR: Failed to build gem native extension.
        /usr/bin/ruby1.9.1 extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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:
Gem files will remain installed in /var/lib/gems/1.9.1/gems/nokogiri- for inspection.
Results logged to /var/lib/gems/1.9.1/gems/nokogiri-

Read more

XML парсер на Ruby

Парсить XML можно с помощью библиотеки Nokogiri
Ставим Ruby-dev

aptitude install ruby-dev
tar xvf rubygems-1.5.0.tgz
cd rubygems-1.5.0
sudo ruby setup.rb
gem install optparse-command

А после Nokogiri
gem install nokogiri