Results 1 to 3 of 3

Thread: Loaderror Nokogiri

  1. #1
    Just burned his ISO
    Join Date
    Jul 2011
    Posts
    5

    Default Loaderror Nokogiri

    I wrote a small script in ruby which make use of Nokogiri and tried to fire it up in Backtrack 5 but it didn't seem to load.

    The error message is :filename.rb:5 'require' no such file to load --nokogiri (LoadError)
    from filename.rb:5 in <main>

    I do 'gem install nokogiri'. Gem seems to install fine, but the error persists.
    When I do gem query --local, it even says that Nokogiri (1.5.0, 1.4.4) is installed correctly.
    All the required libraries for Nokogiri seems to be already installed OK.

    I've checked out a few websites such as this:
    http://stackoverflow.com/questions/1...r-not-ruby-dir

    However, none of them is 100% the same issue (they have different error messages), and the various solutions I have tried so far do not work (such as writing require 'rubygems' in my ruby script).

    If anyone knows how to resolve this issue, this would be quite appreciated.

  2. #2
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Loaderror Nokogiri

    Seems like a syntax error on line 5 of filename.rb.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  3. #3
    Just burned his ISO
    Join Date
    Jul 2011
    Posts
    5

    Default

    Aight! I found the answer!

    https://github.com/rdp/ruby_tutorial...ding_fails_191

    Command:
    ruby --disable-gems filename.rb

    does the trick.

    + include require 'rubygems' in filename.rb itself.
    Last edited by g0tmi1k; 10-05-2011 at 10:43 PM. Reason: Merged

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •