I am very new to OS X and I don't know anything about compiling, MacPorts, Homebrew, etc. All I want to do is install the Nokogiri gem on OS X.
In Windows, it was as simple as:
gem install nokogiri
However, when I try this on OS X, I get the following message:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
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.4.4 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.4/ext/nokogiri/gem_make.out
Again, I am not very good with OS X and I have no idea what this means.
Is there an easy way to install Nokogiri without having to mess with MacPorts and other programs I've read about online?
I have XCode 4 installed (some people say XCode is required for this to work), and I'm using Ruby 1.8.7.
Also, I tried installing MacPorts and following the instructions online and I get the following:
Derek-MacBook-Pro:~ derek$ sudo port install libxml2 libxslt
Password:
---> Computing dependencies for libxml2Error: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
To report a bug, see <http://guide.macports.org/#project.tickets>