rbenv and nokogiri errors on MacOSX

43 Views Asked by At

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

1

There are 1 best solutions below

6
myconode On

It looks like you also have rvm still activated. Try uninstalling that (rvm implode) and then double-checking rbenv is initialized (which ruby should point to a version installed in the shimmed directory). After that try re-bundling in your rails project.