Can't Get to Work Cocoapods and Yosemite

Can't get to work CocoaPods and Yosemite

In case someone else got the same issue, I did this to fix my issue:

  1. Update Gems

    sudo gem update --system

  2. Uninstalled xcodeproj

    sudo gem uninstall xcodeproj

  3. Make sure to select All versions

  4. Uninstalled Cocoapods

    sudo gem uninstall cocoapods

  5. Install xcodeproj

    sudo gem install xcodeproj

  6. Install cocoapods

    sudo gem install cocoapods

  7. Run

    pod --version to test.

Unable to install Cocoapods on Yosemite DP 7

I ran into the same issue. After much hair pulling following the same steps as everyone else, the following worked.

  1. $ xcode-select --install (to confirm command line tools are installed)

  2. Installed nvm stable (and homebrew): $ \curl -sSL https://get.rvm.io | bash -s stable

  3. close/reopen terminal

  4. Installed ruby 2.1.2: $ rvm install 2.1

  5. Switch to it: $ rvm use 2.1

  6. Uninstall/reinstall xcodeproj and cocoapods

How do I use cocoapods 0.33.1 on Yosemite?

Alright, it seems the easiest solution is to install a Ruby environment manager. This allows the appropriate Ruby version to be loaded when cocoapods asks for it. I haven't dug too deep, but it seems the version CP is looking for is incompatible. (???) Anyway, installing rbenv immediately solved my problem.

I chose rbenv but there's another called RVM. rbenv did a good job explaining the differences between the two, however.

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

Can't get CocoaPods working

I finally solved my problem.

Short answer:

I had to install ruby 2.1.2, then reinstall cocoapods and everything worked.

Long answer:

  1. Resolve all warnings from brew doctor;

    • remove unused libraries;
    • remove MacPorts;
    • resolve additional warnings which I already do not remember;
    • I might even reinstalled brew.
  2. Install rvm;
  3. Install & use ruby 2.1.2 using rvm;

    • rvm requirements complains about many missing packages, install them;
    • among them, there is gcc46, which I was unable to install. After Xcode 4.2 or something, command line tools come without gcc. So if rvm requirements does not find one, it suggests gcc46. But the point is, installing brew install apple-gcc42 solves the problem. rvm requirements stops complaining and you can install ruby 2.1.2:
    • rvm install 2.1.2;
    • rvm use 2.1.2;
  4. Install cocoapods, as suggested in @Varsha Vijayvargiya's answer.

I might forgot something, so if you have any questions - ask. Here are some links which helped me:

  • update mac osx to 10.10 and pod cannot work;
  • Installing Ruby 2.0.0 with RVM and Homebrew on Mac OS X 10.8 Mountain Lion;
  • Homebrew GCC won't install on OS X 10.10 Yosemite with Xcode 6;
  • Installing gcc on Mavericks.

Can not perform `pod install` under el capitan (15A279b)

Solution, fix for Cocoapods error on El Capitan 10.11:

sudo gem install -n /usr/local/bin cocoapods

Cocoa Pods not updating pods on El Capitan

This is caused by the new System integrity protection feature introduced in El Capitan. It restricts even administrators from writing to /usr/bin.

Your best option would be to install gems without needing sudo. There is a good guide on how to do that:

export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH

gem install cocoapods


Related Topics



Leave a reply



Submit