On 2/6/07, Thibault Martin-Lagardette <[EMAIL PROTECTED]> wrote:
> Hello all.
>
> As a PHP developer, I recently decided to get to know ruby, and
> wanted, as a beginning, to create a small ruby gmail client, like the
> python one.
>
> Working under Ubuntu 6.10, I installed ruby 1.8 via apt-get, and then
> RubyGems myself.
>
> After beeing able to retrieve the XML atom feed from Gmail, I wanted
> to parse the XML file.
> I didn't want to use Rexml when I saw its performances.
> Thus I installed libxml-ruby via the command: "gem install -r libxml-ruby".
>
> And now that I want to use it, here's what I get:
>
> -- Snippet --
> /usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8.4/lib/xml/libxml.rb:5:
> uninitialized constant XML
> (NameError)
>        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
>        from ./gmail-atom.rb:6
> -- End Snippet --
>
> Here's my little bit of code :
>
> -- Snippet --
> #!/usr/bin/ruby
>
> require 'rubygems'
> require 'open-uri'
> require 'xml/libxml_so' # I tried w/ and w/o it...
> require 'xml/libxml'
>
> open("https://mail.google.com/mail/feed/atom";,
>         :http_basic_authentication => ['login', 'passwd']
>        ) do |content|
>  feed = content.read
>  xmlfeed = XML::Parser.string(feed).parse
>  xmlroot = xmlfeed.root
>  p xmlroot.class
>  p xmlroot.methods.sort
> end
> -- End Snippet --
>
>
> The matter is that xml/libxml doesn't seem to load libxml_so.so which
> is where the XML module is defined...
> Downloading the gem, or the source and building it myself does the same thing.
> And oh, I tried installing libxml via apt-get, buth it's the 3.4
> version, and without, for instance, the "each" or "first_child"
> methods...
>
> Any idea?

Did you figure this out? I don't think you should need the _so
require. BUt I'm not sure what the issue it.

T.
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to