ruby - Nokogiri on OS X 10.8 -
i know there's ton of questions here on so, can't manage install nokogiri on os x 10.8.3 system.
i did rituals:
brew install libxml2 libiconv libxslt brew link --force libxml2 libiconv libxslt but keep getting these errors after doing sudo gem install nokogiri:
fetching: nokogiri-1.5.5.gem (100%) building native extensions. take while... error: error installing nokogiri: error: failed build gem native extension. /system/library/frameworks/ruby.framework/versions/1.8/usr/bin/ruby extconf.rb checking libxml/parser.h... yes checking libxslt/xslt.h... yes checking libexslt/exslt.h... yes checking iconv_open() in iconv.h... no checking iconv_open() in -liconv... no checking iconv_open() in -liconv... no checking libiconv_open() in iconv.h... no checking libiconv_open() in -liconv... no checking libiconv_open() in -liconv... no ----- libiconv missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html installing dependencies. ----- *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. may need configuration options. the interesting thing libiconv error randomly alternated libxml2 error. followed instructions @ http://nokogiri.org/tutorials/installing_nokogiri.html doesn't work.
edit
i don't believe happened. really, don't.
brew uninstall libxml2 libiconv libxslt it works now, gem installs it. complained little:
no definition parse_memory no definition parse_file no definition parse_with no definition get_options no definition set_options /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during chdir block /system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during chdir block but @ least in middleman (that's i'm using it) works charm. crazy?
what did work me this.
brew
after installed brew, install following libs:
brew install libxml2 libxslt rvm
now, in bash (if you're on zsh, issue bash move bash shell) do:
curl -l https://get.rvm.io | bash -s stable --rails --autolibs=enabled to rvm (ruby version manager). in bash|zshrc, paste following line:
[[ -s "$home/.rvm/scripts/rvm" ]] && source "$home/.rvm/scripts/rvm" to load rvm on startup.
note if didn't install above libs brew, rvm installation fail.
restart terminal , issue:
rvm install 1.9.3 # or version like, 1.9.3 worked nokogiri and use version system default issue:
rvm --default use 1.9.3 install nokogiri via gem
now gem install nokogiri command should work fine.
note omitting sudo fundamental when dealing rvm , gem stuff. that's 1 of things missed , made me go crazy.
Comments
Post a Comment