Need help to install Nokogiri

Hi,

I am using Ubuntu13.04. I have installed Ruby2.0 using RVM. But now
looking for any guideline to install nokogiri and selenium-webdriver.
But not found any concrete step by step instructions to install the same
using RVM. can anyone out there help me.

I have installed Ruby using the link:
https://gist.github.com/pcjpcj2/5443017

Thanks

Nokogiri is a gem, them you only need

gem install nokogiri

but first you need install this libraries for ubuntu[0]:

sudo apt-get install libxml2 libxml2-dev libxslt libxslt-dev

[0]GitHub - sparklemotion/nokogiri: Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.

Matt’s

Carlos M. wrote in post #1107144:

Nokogiri is a gem, them you only need

gem install nokogiri

but first you need install this libraries for ubuntu[0]:

sudo apt-get install libxml2 libxml2-dev libxslt libxslt-dev

As I installed Ruby using RVM, I thought I need to install everything
using RVM. So if I do sudo to install nokogiri then will it work?

On 29 April 2013 05:47, Love U Ruby [email protected] wrote:

using RVM. So if I do sudo to install nokogiri then will it work?
If using rvm you must /not/ use sudo when installing gems. However
you should not need to install it manually, just put it in Gemfile for
the application and bundle install will automatically install it. You
do need sudo for installing the libxml stuff of course.

Colin

On 29 April 2013 08:26, Love U Ruby [email protected] wrote:

Thanks for your reply! I am new to Ubuntu. I am basically worked on
windows,where only “gem install nokogiri” worked. But in Linux things
are little bit fancy.

Thus I need a step by step installation help. Could you? I also gave the
link in the first post from where I downloaded the Ruby just as FYI.

Are you running Rails? If so which version?

Colin

Colin L. wrote in post #1107182:

On 29 April 2013 05:47, Love U Ruby [email protected] wrote:

using RVM. So if I do sudo to install nokogiri then will it work?
If using rvm you must /not/ use sudo when installing gems. However
you should not need to install it manually, just put it in Gemfile for
the application and bundle install will automatically install it. You
do need sudo for installing the libxml stuff of course.

Colin

Thanks for your reply! I am new to Ubuntu. I am basically worked on
windows,where only “gem install nokogiri” worked. But in Linux things
are little bit fancy.

Thus I need a step by step installation help. Could you? I also gave the
link in the first post from where I downloaded the Ruby just as FYI.

Please help.

On 29 April 2013 09:27, Love U Ruby [email protected] wrote:

Colin

I am using Rail 4.0. as the first post link is for Ruby2.0 and Rail 4.0
installation.

Have you worked through a good tutorial such as railstutorial.org
(which is free to use online)? That will show you the basics,
including how to use the Gemfile to control the gems you want. I
think railstutorial has a beta version of the tutorial for rails 4.
You do realise, I presume, that rails 4 is not released yet so you may
well come across problems. Make sure that you use the correct version
of rails for any tutorial that you use. With rvm is not a problem to
have multiple versions of rails (and ruby) installed, of course.

Colin

Colin L. wrote in post #1107190:

On 29 April 2013 08:26, Love U Ruby [email protected] wrote:

Thanks for your reply! I am new to Ubuntu. I am basically worked on
windows,where only “gem install nokogiri” worked. But in Linux things
are little bit fancy.

Thus I need a step by step installation help. Could you? I also gave the
link in the first post from where I downloaded the Ruby just as FYI.

Are you running Rails? If so which version?

Colin

I am using Rail 4.0. as the first post link is for Ruby2.0 and Rail 4.0
installation.

Carlos M. wrote in post #1107144:

Nokogiri is a gem, them you only need

gem install nokogiri

but first you need install this libraries for ubuntu[0]:

sudo apt-get install libxml2 libxml2-dev libxslt libxslt-de

Tried but got error:

kirti@kirti-Aspire-5733Z:~$ sudo apt-get install libxml2 libxml2-dev
libxslt libxslt-dev
[sudo] password for kirti:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libxslt1-dev’ instead of ‘libxslt-dev’
E: Unable to locate package libxslt
kirti@kirti-Aspire-5733Z:~$

On 29 April 2013 18:08, Love U Ruby [email protected] wrote:

kirti@kirti-Aspire-5733Z:~$ sudo apt-get install libxml2 libxml2-dev
libxslt libxslt-dev
[sudo] password for kirti:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libxslt1-dev’ instead of ‘libxslt-dev’
E: Unable to locate package libxslt

You don’t need libxslt, which is lucky as it does not exist. Repeat
the apt-get but leave out libxslt.

Colin

Finally i am done:

kirti@kirti-Aspire-5733Z:~$ sudo apt-get install libxml2-dev
libxslt1-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libxml2-dev is already the newest version.
libxslt1-dev is already the newest version.
The following package was automatically installed and is no longer
required:
vim-runtime
Use ‘apt-get autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

kirti@kirti-Aspire-5733Z:~$ gem install nokogiri
Fetching: nokogiri-1.5.9.gem (100%)
Building native extensions. This could take a while…
Successfully installed nokogiri-1.5.9
Parsing documentation for nokogiri-1.5.9
unable to convert “\x90” from ASCII-8BIT to UTF-8 for
lib/nokogiri/nokogiri.so, skipping
Installing ri documentation for nokogiri-1.5.9
1 gem installed

kirti@kirti-Aspire-5733Z:~$ irb
2.0.0p0 :001 > require ‘nokogiri’
=> true
2.0.0p0 :002 >

On Mon, Apr 29, 2013 at 2:24 PM, Love U Ruby [email protected]
wrote:

kirti@kirti-Aspire-5733Z:~$ irb
2.0.0p0 :001 > require ‘nokogiri’
=> true
2.0.0p0 :002 >

Just to give you a heads up for next time: curl -L https://get.rvm.io|bash -s head --ruby=2.0.0 --autolibs=enabled would
have installed
everything from libxml2 down to Git for you and installed Ruby 2.0.0 and
Rails as well. You can see a list of what we install for you here:

On 30 April 2013 13:37, Love U Ruby [email protected] wrote:


Thanks for your suggestions! Now I need to install selenium-webdriver
also.But I did gem install selenium-webdriver. But it seems not
installed. As when I am doing require selenium-webdriver giving me
load error.

Did you get any errors when you installed it?

What do you see if you do
gem list selenium-webdriver

If it does not show it installed then try
gem install selenium-webdriver
again. If you still can’t get it to install post the result of the
two commands here. Copy/Paste the text so we can check for typos.

Also post the result of the require command.

Colin

Jordon B. wrote in post #1107360:

On Mon, Apr 29, 2013 at 2:24 PM, Love U Ruby [email protected]

Just to give you a heads up for next time: curl -L https://get.rvm.io|bash -s head --ruby=2.0.0 --autolibs=enabled would
have installed
everything from libxml2 down to Git for you and installed Ruby 2.0.0 and
Rails as well. You can see a list of what we install for you here:

Thanks for your suggestions! Now I need to install selenium-webdriver
also.But I did gem install selenium-webdriver. But it seems not
installed. As when I am doing require selenium-webdriver giving me
load error.

Can you suggest about this for Ubuntu 13.04 OS?

Thanks