Skip to content


Subversion checkout URL

You can clone with
Download ZIP


error installation gem #699

GG91 opened this Issue · 15 comments

5 participants


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


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?


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


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


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


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?


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
config.log' for more details

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


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


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


@GG91 Does this help?


check it out
Schermata 12-2456283 alle 10 48 59


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.


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


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


@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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.