error installation gem #699

GG91 opened this Issue Dec 19, 2012 · 15 comments


None yet
5 participants

GG91 commented Dec 19, 2012

hello i have some problem with installation of cocoapods.

with the command:
sudo gem install cocoapods

i have this output:
ERROR: While executing gem ... (NameError)
uninitialized constant YAML::PrivateType

i have rubygems v 1.8.24
i have installed Xcode command tool and gcc 4.2 for lion


alloy commented Dec 19, 2012

With some quick googling I encountered this thread, which seems to indicate that that issue should be fixed nowadays.

Did you install a custom Ruby (maybe through homebrew, RVM, or rbenv)? Can you re-run the command with the --verbose option?

GG91 commented Dec 19, 2012

i have already installed macRuby 0.12 via RVM
the output of the command in verbose mode is
302 Moved Temporarily
200 OK
ERROR: While executing gem ... (NameError)
uninitialized constant YAML::PrivateType


fabiopelosin commented Dec 19, 2012

CocoaPods is not supported in MacRuby, it is supported in Ruby MRI 1.8.7 and 1.9.3.

GG91 commented Dec 19, 2012

thanks you I have already realized this.
but now it returns another error:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb

checking for -std=c99 option to compiler... yes
checking for CoreFoundation... no
checking for main() in -lCoreFoundation... no
CoreFoundation is needed to build the Xcodeproj C extension.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/xcodeproj-0.4.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/xcodeproj-0.4.0/ext/xcodeproj/gem_make.out

there is no other way to install cocoapods? ... for example by installing manually


alloy commented Dec 19, 2012

there is no other way to install cocoapods? ... for example by installing manually

Alas, no. Something in your toolchain isn’t correct, but the issue can be quite opaque. Can you see if any of the latter comments on #192 help you out?

GG91 commented Dec 20, 2012

I took a look at those solutions but I do not think there is something that works.
Just now I was trying to update Ruby through rbenv but that fails too. the output is as follows

$ rbenv install 1.9.2-p180 Downloading yaml-0.1.4.tar.gz... -> Installing yaml-0.1.4...


Inspect or clean up the working tree at /var/folders/7f/5fyyc6td1_j3_yjjpndtbt500000gp/T/ruby-build.20121220095738.1269
Results logged to /var/folders/7f/5fyyc6td1_j3_yjjpndtbt500000gp/T/ruby-build.20121220095738.1269.log

Last 10 log lines:
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/local/bin/gcc-4.2
checking whether the C compiler works... no
configure: error: in /var/folders/7f/5fyyc6td1_j3_yjjpndtbt500000gp/T/ruby-build.20121220095738.1269/yaml-0.1.4': configure: error: C compiler cannot create executables Seeconfig.log' for more details

I also noticed that the installation of cocoapods fails while attempting to satisfy the dependency of xcodeproj_ext


fabiopelosin commented Dec 20, 2012

Have you installed the Xcode command line tools? Btw, Ruby 1.9.2 is not supported because it is buggy.

GG91 commented Dec 20, 2012

Yes the command tool is currently installed. I use ruby 1.8.7 (system version)


alloy commented Dec 20, 2012

@GG91 Does this help?

GG91 commented Dec 21, 2012

check it out
Schermata 12-2456283 alle 10 48 59

phuesler commented Jan 2, 2013

When you get the "Missing CoreFoundation" error, installing the XCode Command Line Tools fixes the problem. One gotcha is, that every time you upgrade XCode, you might need to install the Command Line Tools again.


AliSoftware commented Jan 7, 2013

See the duplicate issue #430, maybe you will find a solution in the comments there.

GG91 commented Jan 9, 2013

I gave up, I lost too much time and I have too much work to do, even if it would help me for now I continue to do everything manually, thanks anyway


alloy commented Jan 10, 2013

@GG91 Understandable and unfortunate. If you ever re-install your system at some point, it might be worth it to check it again.

@alloy alloy closed this Jan 10, 2013


fabiopelosin commented Jan 10, 2013

Btw, we are aware that installing CocoaPods might not be the best experience, we are working on it, however it will take some time for more simple installation.

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment