Ruby Gem Installation Error After Osx Yosemite and Xcode 6 Installation

Strange messages from gems after switching to Xcode 6 and Yosemite

for each gem that is being ignored you will have to run:

gem install %gemname%

and then

gem pristine %gemname%

ERROR: Failed to build gem native extension on Yosemite

Finally I found out what is a problem.

First that it is required to do is to install Xcode command tool.

xcode-select --install

Second it is required to check if Ruby on Rails is well configured.

After that connect Xcode command tool in preferences of Xcode 6.

Then it is possible to use command sudo gem install cocoapods.

Installing Xcode on Mac OSX (Yosemite)

Take a look at "Xcode Command Line Tools" on Rails and XCode Command Line Tools.

XCode is a full blown development environment for Apple native-development. You don't need all of that overhead for Ruby or Rails, so go with the Command Line Tools to get just what you need.

Your situation might be analogous to doing an installation of Eclipse IDE in order to run some Java software that really only needs a Java Runtime Engine installation to run.

gem install compass error after Mac OS Sierra 10.12.6 update

Don't do sudo gem install -n /usr/local/bin compass

The whole point of using rbenv is to let it handle all of your dependencies and not have to deal at all with your OS system ruby or it's gems. You need to get your $PATH configuration right and then you won't need to ever use sudo in fact you should NOT with gem install or any gem commands after getting your environment setup correctly.

Did you happen to try npm install -g grunt-cli ?

UPDATE: as expect your $PATH is not correct.

Close all terminals. Start a new one. Then run this.

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

This should help you figure out what's wrong in your $PATH setting.
Refer to https://github.com/rbenv/rbenv#installation

But first specifically try:

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile

Then restart your terminal and check gem env again and see if your path includes .rbenv

If these steps don't get you working then I suggest to fully uninstall rbenv and start over from step 1 of https://github.com/rbenv/rbenv#installation

Installing Nokogiri on OSX 10.10 Yosemite

I managed to install Nokogiri under Yosemite (OS X 10.10 Preview).

Step 1: Install Brew

Skip this if brew was installed.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Step 2: Install brew libs

brew tap homebrew/dupes
brew install libxml2 libxslt
brew install libiconv

Step 3: Download and install Apple Commandline Tools for 10.10

It's important that you need to restart after installation.

Link: command_line_tools_for_osx_10_10_june_2014.dmg

After restarted, you can check installation in Terminal:

> xcode-select --install
-> xcode-select: error: command line tools are already installed, use "Software Update" to install updates

This error means you have commandline tool installed correctly.

Installing Nokogiri

Try using n previous version 1.6.1 in your Gemfile, version 1.6.2.1 has issues currently with "10.10 Preview". It only works with my rbenv Ruby 2.0.0p247, failed to install on 2.1.1. You can give your existing Ruby versions a couple of tries.

gem install nokogiri  -v '1.6.1' -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14/

Cocoapods with Xcode 6 and 10.10 Yosemite

  1. Open Xcode 6
  2. Open Preferences
  3. Click the Locations tab
  4. Change the Command Line Tools version to Xcode 6.0
  5. Uninstall cocoapods

    $ sudo gem uninstall cocoapods
  6. Uninstall xcodeproj
    $ sudo gem uninstall xcodeproj
  7. Install xcodeproj

    $ sudo gem install xcodeproj
  8. Install cocoapods

    $ sudo gem install cocoapods
  9. Run pod --version to verify that it worked


Related Topics



Leave a reply



Submit