简体   繁体   中英

Error when installing Rails on Mac OSx 10.10 Yosemite

I am trying to install Rails on my updated Mac OSx 10.10 Yosemite. I first used the command:

$ \curl -L https://get.rvm.io | bash -s stable --ruby=2.2.0

to install the latest RVM and Ruby versions. I also updated the gems using the command:

$ gem update --system

Until now everything looks OK but when I try to install the latest Rails version using the command:

$ gem install rails --version=4.2.0

I get this error message:

>   ERROR: Failed to build gem native extension.
    Buidling Nokogiri with a packaged version of libxml2-2.9.2
with the following patches applied:
    - 0001-Revert-Missing-initialization-for-the-catalog-module.patch
    - 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch

I tried installing Nokogiri, and retried the command but got the same error message.

Any suggestion?

There are several things here you can try:

Error to install Nokogiri on OSX 10.9 Maverick?

I don't use RVM, but also had trouble installing Nokogiri on a fresh Mavericks installation a while back and resolved it with one of the alternative answers farther down the page , using xcode-select --install .

Also note the accepted answer has updated instructions for Yosemite, so I'd check out all the answers for possible solutions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM