Mountain Lion - LibXML & Nokogiri

前端 未结 9 1618
一整个雨季
一整个雨季 2020-12-24 12:34

I\'ve just updated to OS X Mountain Lion and I\'m getting the following when working with rails and terminal.

WARNING: Nokogiri was built against LibXML vers         


        
9条回答
  •  南笙
    南笙 (楼主)
    2020-12-24 13:26

    Passing flags to install gems is generally a bad idea if you've got a Gemfile and are using bundler. Even if you're not, you'll be on a custom-compiled libxml and you probably won't remember...! I started by hacking around trying to get this to work and even brew installing libxml2.

    Turns out, if you reinstall (and therefore recompile) the ruby version you're working with (hopefully with rvm), it'll work.

    So, for RVM users:

        rvm list (gets your rubies - choose the one being used)
        rvm uninstall RUBY_VERSION
        rvm install SAME_RUBY_VERSION
        bundle (or gem install nokogiri)
    

    It did the trick for me.

提交回复
热议问题