2

I am trying load a ruby script that uses nokogiri, but get a LoadError that I dont understand.

LoadError: dlopen(/Library/Ruby/Gems/1.8/gems/nokogiri-1.5.2/lib/nokogiri/nokogiri.bundle, 9): Library not loaded: /opt/local/lib/libiconv.2.dylib Referenced from: /Library/Ruby/Gems/1.8/gems/nokogiri-1.5.2/lib/nokogiri/nokogiri.bundle Reason: Incompatible library version: nokogiri.bundle requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0 - /Library/Ruby/Gems/1.8/gems/nokogiri-1.5.2/lib/nokogiri/nokogiri.bundle

Any on what is wrong?

1 Answers1

2

Seems that one of the requirements for Nokogiri is not installed in the right version.

Try running

sudo apt-get install libiconv-ruby

to update libiconv package before run your script (assuming you're using linux).

Rudy Seidinger
  • 1,059
  • 13
  • 22
  • 1
    If it didnt solve the problem, if yiou have brew installed, you might want to run: `brew update`, then `brew install libiconv` – Rudy Seidinger May 12 '12 at 03:23