I am trying to install mechanize on a Mac OS X Version 10.7.3 with ruby version 1.8.7. The problem is with one of its dependencies nokogiri. I have seen other posts about having xcode installe and I do it is version 4.3.2 . Here is the error I am receiving. Thank you in advance.
sudo gem install mechanize
Building native extensions. This could take a while...
ERROR: Error installing mechanize:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/nokogiri-1.5.2 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/nokogiri-1.5.2/ext/nokogiri/gem_make.out