On Fri, Dec 10, 2010 at 6:28 AM, A. Mcbomb <atomicmcbomb / gmail.com> wrote:
> Thanks Alex.
>
> I tried following the instructions to install the Nokogiri gem but it
> gave me a few errors. I tried linking the libraries during the install:
>
> [server01][/]$ gem install nokogiri -- --with-xml2-lib=3D/usr/local/lib
> --with-xml2-include=3D/usr/local/include/libxml2
> --with-xslt-lib=3D/usr/local/lib
> --with-xslt-include=3D/usr/local/include/libxslt
> Building native extensions. =A0This could take a while...
> Successfully installed nokogiri-1.4.4
> 1 gem installed
> Installing ri documentation for nokogiri-1.4.4...
>
> No definition for get_options
>
> No definition for set_options
>
> No definition for parse_memory
>
> No definition for parse_file
>
> No definition for parse_with
> Installing RDoc documentation for nokogiri-1.4.4...
>
> No definition for get_options
>
> No definition for set_options
>
> No definition for parse_memory
>
> No definition for parse_file
>
> No definition for parse_with
> ---
>
> As a test, I created a test file with the following code:
>
> =A0 require 'open-uri'
> =A0 doc =3D Nokogiri::HTML(open("http://www.anysite.com/"))
>
> But when I run it, I get the following so I don't think the gem in
> installed correctly:
>
> [server01][/usr/bin]$ ./test.rb
> ./test.rb:7: uninitialized constant Nokogiri (NameError)
>
> Would you be able to suggest anything to help me get Nokogiri installed
> and working?

You have to require 'nokogiri'

Jesus.