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
- Open Xcode 6
- Open Preferences
- Click the Locations tab
- Change the
Command Line Tools
version toXcode 6.0
- Uninstall cocoapods
$ sudo gem uninstall cocoapods
- Uninstall xcodeproj
$ sudo gem uninstall xcodeproj
- Install xcodeproj
$ sudo gem install xcodeproj
- Install cocoapods
$ sudo gem install cocoapods
- Run
pod --version
to verify that it worked
Related Topics
"No Available Formula for Gcc46" While Installing Ruby 1.9.3 on Os X with Rvm:
Ruby/Rails Collection to Collection
How to Send Mail with Ruby Over Smtp with Ssl (Not with Rails, No Tls for Gmail)
Ruby on Rails Collection Select - How to Pre-Select the Right Value
Form_For with Multiple Controller Actions for Submit
Why Is Ruby Throwing a Segmentation Fault on Only My System, and Only in This Rails Application
Update Rails to a Specific Version
What's the Efficient Way to Multiply Two Arrays and Get Sum of Multiplied Values in Ruby
How to Read from Redis Inside a Multi Block in Ruby
Using Authlogic_API for Rails Rest API Access
Check If the Sum of Two Different Numbers in an Array Equal a Variable Number
Why Is a String Key for a Hash Frozen
Normal Variables VS Instance Variable in Ruby, Whats the Difference
How Can a Nested Class Access a Method in The Outer Class in Ruby