2

After failing to manage installing properly the Jekyll gem (website dev), the problem started out with pod install returning the infamous message described also in other questions on this site (when running pod install I get The `master` repo requires CocoaPods 0.32.1, try updating but still in 0.31 and others)

[!] The `master` repo requires CocoaPods 0.32.1 - 
Update CocoaPods, or checkout the appropriate tag in the repo.
/Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:217:in `rescue in run': undefined method `verbose?' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:210:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
    from /usr/bin/pod:23:in `load'
    from /usr/bin/pod:23:in `<main>'

Running pod ver returns 0.29.0 even though I successfully installed 0.32.1.
I noticed that the above message points to the 0.29.0 install directory, which does not match the current installation directory (/usr/local/lib/ruby/gems/2.1.0/gems)

I've run through all possible gem commands iterations but still can't come out on top of it (cleanup, uninstall, install, etc).
gem check returns the following:

xcodeproj-0.16.1.gem has 5 problems
  ext/xcodeproj/Makefile:
  Extra file
ext/xcodeproj/extconf.h:
  Extra file
ext/xcodeproj/mkmf.log:
  Extra file
ext/xcodeproj/xcodeproj_ext.bundle:
  Extra file
ext/xcodeproj/xcodeproj_ext.o:
  Extra file

Don't know if it relates.

Removing the /Library/Ruby/Gems/2.0.0/gems/ directory returns errors on any pod command.

Short of reinstalling the whole operating system(!)--which, tested on a fresh volume, proved solving the issue--can't figure this one out.
Any pointer?

Community
  • 1
  • 1
morosaka
  • 21
  • 3

1 Answers1

0

It sounds like you may be using RVM and installing gems into a gemset. If that is the case, then it is possible for you to have multiple versions of the same gem installed on your system simultaneously.

If you want to update the system-wide gem, use sudo, e.g. sudo gem install cocoapods. If you want to update the RVM, exclude sudo, e.g. gem install cocoapods.

Also be sure that if you are using an RVM, you are not running pod install as root, either.

4mnes7y
  • 158
  • 8
  • You are right, it looks like something like that. RVM is not in use though, I did tried anyway to probe this route but nothing worked. – morosaka Jun 07 '14 at 19:07