I have tried everything google has thrown at me to get my rails application running with nokogiri. I am running my app using ruby v2.2.7 and my ruby version is managed via rbenv.
I have followed every step here http://www.nokogiri.org/tutorials/installing_nokogiri.html
I have xcode installed. But keep receiving this error when I try to boot up my rails server:
dlopen(/Users/USER/dev/APP/vendor/bundler/ruby/2.2.0/extensions/x86_64-darwin-17/2.2.0-static/nokogiri-1.8.1/nokogiri/nokogiri.bundle, 9): Library not loaded: /Users/USER/.rvm/rubies/ruby-2.2.7/lib/libruby.2.2.0.dylib
It looks like you also have
rvmstill activated. Try uninstalling that (rvm implode) and then double-checking rbenv is initialized (which rubyshould point to a version installed in the shimmed directory). After that try re-bundling in your rails project.