question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`create` command fails if cocoapods is not available

See original GitHub issue

If creating a project on macOS (npx @capacitor/cli create), it expects the user to have cocoapods installed. If this is only a requirement if the user is developing for the web, then this should be optional and not fail.

⚡️   Welcome to Capacitor (CLI v1.0.0-alpha.35) ⚡️

✔ Creating app cap-test in xxxxxx-capacitor-test with id com.xxxxxx.cap in 22.17ms
✔ Installing dependencies in 24.70s
✔ Installing iOS dependencies in 9.24s
✔ Adding native xcode project in: /Users/xxxxxxxxxx/Repositories/xxxxxx-capacitor-test/ios in 44.29ms
✔ Copying web assets from www to ios/App/public in 8.84ms
✔ Copying native bridge in 1.60ms
✔ Copying capacitor.config.json in 2.82ms
✔ copy in 28.07ms
✔ Updating iOS plugins in 1.67ms
  Found 0 Capacitor plugins for ios:
✖ Updating iOS native dependencies: 
✖ update ios: 
✖ add default platforms: 
Usage: npx @capacitor/cli create appDir appName appId
Example: npx @capacitor/cli create my-app "My App" "com.example.myapp"
[error] /bin/sh: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
etonyalicommented, Aug 9, 2018

I was having issue with “npx cap add ios” for ionic. Error was: [error] /bin/sh: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

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

just putting it out there for people who are having trouble.

versions:

1reaction
erhandemircicommented, Dec 3, 2019

thank you @etonyali . solved this problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

CocoaPods not installed or not in valid state - Stack Overflow
CocoaPods not installed or not in valid state · 1. have you tried to run the command from the error message sudo gem...
Read more >
Troubleshooting - CocoaPods Guides
<Using the CocoaPods Project · Go to Product > Edit Scheme · Click on Build · Add the Pods static library, and make...
Read more >
Trouble with installing cocoapods | Apple Developer Forums
This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it....
Read more >
CocoaPods installation failure when building for iOS
CocoaPods installation failure when building for iOS · 1. Right-click on the folder with the assembled build and click the "New Terminal at ......
Read more >
Cordova SDK Troubleshooting - Visual Studio App Center
For more information on CocoaPods commands, see the CocoaPods command line reference. Module 'AppCenter' not found iOS build error. If you see ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found