Gem install nokogiri osx




















The error message gives a clue here: The compiler failed to generate an executable file. After upgrading to Maverick, I had a similar problem. I use RVM with Ruby 1. I was facing the same issue from past two weeks while trying to run a rails 3 version application. Use this command every time you are not able to bundle install or anything.

This thing is working on El Capitan, rails 3. And also if you already have the Xcode and then also you are not getting the same errors installing any gem, try this solution. I had this issue as well. None of these answers worked for my particular case, and since I am a newb I figured my solution might be able to help someone else.

I am using Yosemite and was using Ruby 1. There was a security exposure for p so I was trying to update to Ruby 1. I used RVM, then tried to migrate my gems and many of them didn't go. Then I tried to bundle install but that was failing and I thought maybe it was a conflict between the various paths and dependencies so I removed the older version of Ruby.

This broke everything. I kept getting a message saying that the C compiler was missing, even though I had downloaded XCode and recently updated the CLI tools. I found another website that told me to download a third party GCC, which I did.

So I did. Anyway, longer story merely long: the solution that finally worked for me was to get rid of RVM and just use brew to download the Ruby version I wanted then before running bundle install.

Every single darn thing on here didn't do it for me I didn't get into brew reinstalls, oy , but this finally did found via a bug report on some unrelated project :. Check your Commandline tools version. Set up your machine to use the Xcode 5. X command line tools, then run:.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.

Learn more. Error to install Nokogiri on OSX Ask Question. Asked 8 years, 2 months ago. Active 2 years, 10 months ago. Viewed 53k times. Check the mkmf. You may need configuration options.

RuntimeError You have to install development tools first. I can't find what's wrong in my enviroment, can you help me? Improve this question. Add a comment. Active Oldest Votes. Improve this answer. Jean 7 7 silver badges 17 17 bronze badges. Not for me: "libxml2 is missing. Had to add --use-system-libraries. Than it worked on a brand new mavericks installation with Xcode 5.

This is the only one that would work for me, on Show 7 more comments. Micah Alcorn Micah Alcorn 2, 1 1 gold badge 22 22 silver badges 44 44 bronze badges. Thank you, works for me! PS: very good jasdeep. Doh, yes, I had neglected to install the XCode command line tools on my clean Mavericks install.

I found this log and saw that gcc I completely uninstalled rvm and ruby from brew , installed again, and it worked. So, I just run brew install apple-gcc That command don't work for you?

I ran xcode-select --install before the brew install and all works now. LucyBain I realy don't remember I have libxml2, libxslt, and libiconv installed via Homebrew, and each is linked.

I've wasted at least a day on this - just trying to get one Ruby gem installed. I'd really like to get back to actually developing. You can't assume that the version of ruby built-into OS X is compatible with any gems you want to use. Most rubiers will tell you don't even bother useing the ruby that ships with OS X. But you can install multiple versions of ruby, and you'll definately need a ruby version manager if you intend to use lots of gems. IMO, ruby is broken, someone's going to have to pull it out and get it neatly reeled in for it to be fixed, and I'm just not up to it.

I'm not the guy. Not me. I use MacPorts to manage It appears from your provided logs that you're missing stuff. That's what's nice about MacPorts and any mature package manager ; it takes care of the dependecies for you if they're not installed. But you should really get to know and love MacPorts, it is your friend.

Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. If it does, where does it point to? Wow, too bad Apple removed that path. No wonder why Nokogiri didn't find the library on your machine. I consider this a bug of macOS.

Indeed after trying many different suggestions the following worked for me with the latest brew and OSX At least for me, I had to install the xcode command line tools first. I wrongly assumed I had it installed since i dev on my home computer and it's from the middle of last year. As it makes an ss of U and ME :. As for the --with-xml2-include , I doubt that is needed when the section Using Your System Libraries is followed. I think we need more investigation about that. Currently if we need to add anything, simply.

You may want to try using your system libraries if you meet issues. And do you have pkg-config? As I asked in my comment above ,. After many unsuccessful attempts to get nokogiri to make use of Xcode files, I coaxed it to work with sudo xcodebuild -license accept , then installed again. OK, one final time.

As I mentioned in this comment and this comment , I need to know from Mac users whether we need to update the installation instructions. Please feel free to use my last comment for your documentation. I think, after that you should post a link to the docu here and close the issue. We are probably discussing to lock the reply. Or at least open another issue at the documentation repository.

Now that you have time testing, could you please check whether the steps in Install with system libraries works for you? It worked for me. If it also works for you, I will add that into the macOS part. This reads are already full of duplicated information.



0コメント

  • 1000 / 1000