CocoaPods returns error when I was trying to Pod install. Following are what I tried so far after some Google:
As mentioned in http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/, I have removed and re-downloaded the master repo with sudo rm -fr ~/.cocoapods/repos/master/ and Pod Setup
Reinstall CocoaPods and xcodeproj from gem
Install with CocoaPods 0.36.0 beta
I am using Xcode 6.1.1 and Yosemite 10.10.2.
$ pod setup --verbose
Setting up CocoaPods master repo
Creating shallow clone of spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
$ /usr/local/bin/git clone 'https://github.com/CocoaPods/Specs.git' master --depth=1
Cloning into 'master'...
Checking out files: 100% (26795/26795), done.
$ /usr/local/bin/git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
[!] There was an error reading '/Users/sythus/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:316:in `rescue in version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:313:in `version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:234:in `check_version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:57:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:49:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:84:in `add_master_repo'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:40:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:32:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
Thanks for answering!
I missed an issue in CococPods. It seems like the problem comes with psych 2.0.8 Pod setup error. #2908
sudo gem uninstall psych
sudo gem install psych -v 2.0.5
Related
It comes to error when installing cocoapods on MacOS(M1 chip). I ran the command sudo gem install cocoapods and got the following errors.
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
/Library/Ruby/Site/2.6.0/rubygems/installer.rb:712:in `verify_gem_home'
/Library/Ruby/Site/2.6.0/rubygems/installer.rb:902:in `pre_install_checks'
/Library/Ruby/Site/2.6.0/rubygems/installer.rb:302:in `install'
/Library/Ruby/Site/2.6.0/rubygems/resolver/specification.rb:104:in `install'
/Library/Ruby/Site/2.6.0/rubygems/request_set.rb:194:in `block in install'
/Library/Ruby/Site/2.6.0/rubygems/request_set.rb:182:in `each'
/Library/Ruby/Site/2.6.0/rubygems/request_set.rb:182:in `install'
/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:214:in `install_gem'
/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:230:in `block in install_gems'
/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:223:in `each'
/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:223:in `install_gems'
/Library/Ruby/Site/2.6.0/rubygems/commands/install_command.rb:169:in `execute'
/Library/Ruby/Site/2.6.0/rubygems/command.rb:323:in `invoke_with_build_args'
/Library/Ruby/Site/2.6.0/rubygems/command_manager.rb:185:in `process_args'
/Library/Ruby/Site/2.6.0/rubygems/command_manager.rb:149:in `run'
/Library/Ruby/Site/2.6.0/rubygems/gem_runner.rb:51:in `run'
/usr/bin/gem:21:in `<main>'
Expectation: the pod command is correct to install and setup.
After many searches on Apple Develop forum and I found that one solution is helpful so I sticked the code here.
Step 1: Install homebrew
$ curl -fsSL -o install.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
$ /bin/bash install.sh
Step 2:
brew install chruby ruby-install
Step 3:
brew install cocoapods
Step 4:
brew upgrade cocoapods
Now you can use pod install on your iOS project.
I got the below build time error when building for Unity iOS platform. I am using 2019.3.0f1 with Vuforia 8.5.9.
iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.
After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.
pod install output:
Analyzing dependencies
/usr/local/bin/pod install
CocoaPods : 1.5.0
Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17]
RubyGems : 2.5.2.3
Host : Mac OS X 10.13.6 (17G4015)
Xcode : 10.1 (10B61)
Git : git version 2.14.1
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # d8b5f1b90922aae009a341d40e9247a63531eb11
### Plugins
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
### Podfile
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
target 'UnityFramework' do
pod 'Crashlytics', '3.13.4'
pod 'Fabric', '1.10.2'
pod 'FBSDKCoreKit', '~> 5.2'
pod 'FBSDKLoginKit', '~> 5.2'
pod 'FBSDKShareKit', '~> 5.2'
pod 'Firebase/Analytics', '6.14.0'
pod 'Firebase/Core', '6.14.0'
pod 'GoogleSignIn', '>= 4.0.2'
end
RuntimeError - [!] Xcodeproj doesn't know about the following attributes {"inputFileListPaths"=>[], "outputFileListPaths"=>[]} for the 'PBXShellScriptBuildPhase' isa.
If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:321:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:262:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:299:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:296:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:262:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:299:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:296:in `each'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:262:in `new_from_plist'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:203:in `initialize_from_file'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:103:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:918:in `block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:917:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:917:in `block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:912:in `inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer/analyzer.rb:78:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer.rb:243:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer.rb:154:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer.rb:153:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/installer.rb:116:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/command/install.rb:41:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%5B%21%5D+Xcodeproj+doesn%27t+know+about+the+following+attributes+%7B%22inputFileListPaths%22%3D%3E%5B%5D%2C+%22outputFileListPaths%22%3D%3E%5B%5D%7D+for+the+%27PBXShellScriptBuildPhase%27+isa.%0AIf+this+attribute+was+generated+by+Xcode+please+file+an+issue%3A+https%3A%2F%2Fgithub.com%2FCocoaPods%2FXcodeproj%2Fissues%2Fnew&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
[0m
[!] `<PBXNativeTarget name=`Unity-iPhone` UUID=`1D6058900D05DD3D006BFB54`>` attempted to initialize an object with an unknown UUID. `9D25ABA3213FB47800354C27` for attribute: `dependencies`. This can be the result of a merge and the unknown UUID is being discarded.
[!] `<PBXNativeTarget name=`Unity-iPhone` UUID=`1D6058900D05DD3D006BFB54`>` attempted to initialize an object with an unknown UUID. `31CF47E9BE796228AD5C0441` for attribute: `dependencies`. This can be the result of a merge and the unknown UUID is being discarded.
[!] `<PBXNativeTarget name=`Unity-iPhone Tests` UUID=`5623C57217FDCB0800090B9E`>` attempted to initialize an object with an unknown UUID. `5623C58217FDCB0900090B9E` for attribute: `dependencies`. This can be the result of a merge and the unknown UUID is being discarded.
/Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.0.3/lib/gh_inspector/sidekick.rb:91:in `block in validate_delegate': #<Pod::UserInterface::InspectorReporter:0x00007fa4ba036388> does not handle inspector_successfully_recieved_report (RuntimeError)
from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.0.3/lib/gh_inspector/sidekick.rb:90:in `each'
from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.0.3/lib/gh_inspector/sidekick.rb:90:in `validate_delegate'
from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.0.3/lib/gh_inspector/sidekick.rb:20:in `search'
from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.0.3/lib/gh_inspector/inspector.rb:65:in `search_query'
from /Library/Ruby/Gems/2.3.0/gems/gh_inspector-1.0.3/lib/gh_inspector/inspector.rb:59:in `search_exception'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/user_interface/error_report.rb:119:in `search_for_exceptions'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:67:in `report_error'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.0/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:22:in `load'
from /usr/local/bin/pod:22:in `<main>'
pod repo update output:
Updating spec repo master
CocoaPods 1.9.0.beta.2 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.9.0.beta.2
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
[0m
#0 GetStacktrace(int)
#1 DebugStringToFile(DebugStringToFileData const&)
#2 DebugLogHandler::Internal_Log(LogType, LogOption, core::basic_string >, Object*)
#3 DebugLogHandler_CUSTOM_Internal_Log(LogType, LogOption, ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeObjectPtrOpaque*)
#4 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
Hi guys I found the solution for this problem. It turns out to be cocoapods issue with mac Os. The solution is to execute the below commands from terminal.
$ gem uninstall cocoapods
$ gem install cocoapods
You can found more details by following the below link
Cocoapods Troubleshooting
I am new to iOS. Now I am trying to work with CocoaPods. But for me Pod file is not creating in my project. When I type the following line like
"cd /Users/xxx/xxx/ProjectName"
It is coming like
"Macname:ProjectName imfuser$"
after this When I wirte "Pod init"
It is not creating Pod file.
Error I am Getting is Like this :
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/usr/local/bin/pod init
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 1.1.1
Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
RubyGems : 2.0.14.1
Host : Mac OS X 10.12 (16A323)
Xcode : 8.1 (8B62)
Git : git version 2.9.3 (Apple Git-75)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 15a4461d3cead785c7dbce58908e4a38c8d3a9e0
```
### Plugins
```
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.1.1
cocoapods-try : 1.1.0
```
### Podfile
```ruby
```
### Error
```
LoadError - cannot load such file -- nanaimo
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/plist.rb:23:in `read_from_path'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:200:in `initialize_from_file'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:102:in `open'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:333:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+nanaimo&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
- LoadError - cannot load such file -- nanaimo
https://github.com/CocoaPods/CocoaPods/issues/6214 [open] [18 comments]
5 hours ago
- help! cannot load such file -- nanaimo
https://github.com/CocoaPods/CocoaPods/issues/6312 [closed] [4 comments]
a week ago
- LoadError - cannot load such file -- nanaimo
https://github.com/CocoaPods/CocoaPods/issues/6281 [closed] [2 comments]
3 weeks ago
and 5 more at:
https://github.com/cocoapods/cocoapods/search?q=cannot%20load%20such%20file%20--%20nanaimo&type=Issues&utf8=✓
Can anyone please tell me what mistake I have done.
Thanks in Advance.
I have got the same error :
Error
LoadError - cannot load such file -- nanaimo
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/plist.rb:23:in
`read_from_path'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:200:in
`initialize_from_file'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:102:in
`open'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:851:in
`block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:850:in
`each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:850:in
`block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in
`section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:845:in
`inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:66:in
`analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:236:in
`analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:150:in
`block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in
`section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:149:in
`resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:110:in
`install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/install.rb:37:in
`run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in
`run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in
`run' /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/bin/pod:55:in
`<top (required)>' /usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
To solve this issue,firstly uninstall all version of nanaimo
sudo gem uninstall nanaimo
Install (or reinstall) cocoapods
sudo gem install cocoapods
After this, you can install your pods
pod install
I had the same problem from having two versions of nanaimo installed. Try removing the oldest:
gem list | grep nanaimo
sudo gem uninstall nanaimo (then pick the version you want to remove)
Install cocoa pod by this way. Write below code in terminal.
sudo gem install -n /usr/local/bin cocoapods
Before this also remove old version of nanaimo
sudo gem uninstall nanaimo
While running pod install from the system on which jenkins is installed it is running fine but when we run the same command from jenkins it is giving following error. I have checked by adding and removing different pods to check if it is error with the particular pod but it is giving the same error.
```
CocoaPods : 1.0.0
Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
RubyGems : 2.0.14.1
Host : Mac OS X 10.11.4 (15E65)
Xcode : 7.3 (7D175)
Git : git version 2.6.4 (Apple Git-63)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 96d7af9b448bfdb55e1319fac100e08341bb8fab
```
### Plugins
```
cocoapods-deintegrate : 1.0.0
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.0.0
cocoapods-try : 1.0.0
```
### Podfile
```ruby
platform :ios, '7.0'
use_frameworks!
target “MobileShippingApp” do
pod 'Fabric'
pod 'Crashlytics'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
end
end
end
```
### Error
```
NameError - undefined local variable or method `executable' for Pod::Executable:Module
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/executable.rb:111:in `block in which!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/executable.rb:110:in `tap'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/executable.rb:110:in `which!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/executable.rb:133:in `capture_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/sources_manager.rb:101:in `git'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source.rb:45:in `block in url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source.rb:44:in `chdir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source.rb:44:in `url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:347:in `block in source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:346:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:346:in `find'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:346:in `source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/sources_manager.rb:17:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/installer/analyzer.rb:654:in `block in sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/installer/analyzer.rb:653:in `map'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/installer/analyzer.rb:653:in `sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:144:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/installer.rb:114:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```
I came across the same issue, but not through Jenkins though.
I presume that the OS of your system with Jenkins setup is El Capitan.
What I did was, I uninstalled the cocoa pods and installed the latest version of Ruby.
First, I installed Homebrew.
Homebrew comes with a very simple install script. When it asks you to install XCode CommandLine Tools, say yes.
Open Terminal and run the following command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After that I installed Ruby 2.3.1 using rbenv
brew install rbenv ruby-build
rbenv install 2.3.1
rbenv global 2.3.1ruby -v
After Installing latest version of Ruby, I followed the following steps to install the CocoaPods
sudo gem install -n /usr/local/bin cocoapods
After gem was successfully installed
$ export PATH=$PATH:/Library/Ruby/bin
You can check this issue for more details
https://github.com/CocoaPods/CocoaPods/issues/3692
This is occurring When I am trying to build the application through Jenkins.
I have wiped out the current workspace in Jenkins and build the application and its throwing the following error
[workspace] $ touch Pods rm -r -f Pods pod repo update
[workspace] $ pod install
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
[0m
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/usr/bin/pod install
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 0.37.2
Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
RubyGems : 2.5.2
Host : Mac OS X 10.10.3 (14D136)
Xcode : 6.3.2 (6D2105)
Git : git version 2.3.2 (Apple Git-55)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # efe0250cfcdd610a45cdd5691bd3c6bcb38669be
```
### Plugins
```
cocoapods-plugins : 0.4.2
cocoapods-trunk : 0.6.1
cocoapods-try : 0.4.5
```
### Podfile
```ruby
platform :ios, '7.0'
pod 'AFNetworking', '1.3.2'
pod 'FMDB', '~> 2.3'
```
### Error
```
Errno::EEXIST - File exists - /Users/jenkins/.jenkins/jobs/App-iOS-Trunk/workspace/Pods
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/sandbox.rb:58:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/config.rb:202:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/config.rb:202:in `sandbox'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command/project.rb:69:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.8.2/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/lib/cocoapods/command.rb:46:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.37.2/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
```
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=File+exists+-+%2FUsers%2Fjenkins%2F.jenkins%2Fjobs%2FeLearner-Native-iOS-Trunk%2Fworkspace%2FPods&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Build step 'Update CocoaPods' marked build as failure
Finished: FAILURE
For other applications for which current workspace is not not wiped are build gets successful. But when I wipe out the current workspace Its displaying the above Error.
Adding export LANG=en_US.UTF-8 in an "Execute shell" script before invoking pod fixed this on my Jenkins box. Also consider using -d to check the directory.
# Cocoapods
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
if [ -d Pods ]; then
rm -rf Pods
fi
pod repo update
pod install
# ...