Alex
02/19/2025, 7:25 AM/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/local/bin/pod:25:in `<main>'
from /usr/local/bin/ruby_executable_hooks:22:in `eval'
from /usr/local/bin/ruby_executable_hooks:22:in `<main>'
I think the problem is XCode uses the wrong version of Ruby. I don't understand why because I installed ruby 3.3.5. Command "_ruby -v_"prints "_ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [arm64-darwin23]"._
I installed cocoapods:
sudo gem install -n /usr/local/bin cocoapods -v 1.16.2;
sudo gem install -n /usr/local/bin cocoapods-generate -v 2.2.5
My environment: Macbook M3 Max, MacOS 14.7.3, XCode 15.2.François
02/19/2025, 7:40 AMpod --version
, the output should be 1.16.2Alex
02/19/2025, 7:49 AMEnvironment diagnose (to see all details, use -v option):
[✓] Operation System
[✓] Java
[!] Android Studio
! Android Studio (AI-242.23726.103.2422.13016713)
Location: /Users/alex/Applications/Android <http://Studio.app|Studio.app>
Bundled Java: openjdk 21.0.5 2024-10-15
Kotlin Plugin: 242.23726.103.2422.13016713-AS
Kotlin Multiplatform Mobile Plugin: not installed
Install Kotlin Multiplatform Mobile plugin - <https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile>
[✓] Xcode
[✓] CocoaPods
Conclusion:
✓ Your operation system is ready for Kotlin Multiplatform Mobile Development!
Alex
02/19/2025, 7:50 AMpod --version
, the output is 1.16.2François
02/19/2025, 7:54 AMAlex
02/19/2025, 7:59 AMFrançois
02/19/2025, 8:02 AMruby -v
the version is > 3.x ?Alex
02/19/2025, 9:01 AMFrançois
02/19/2025, 9:03 AMAndrew Reed
02/19/2025, 9:07 AMcan't find gem cocoapods (>= 0.a) with executable pod
I think cocoapods doesnt like characters in version numbers, so might be that you are referencing a non semantic version number?François
02/19/2025, 9:23 AMAlex
02/19/2025, 9:46 AMAndrew Reed
02/19/2025, 9:47 AMAlex
02/19/2025, 9:48 AMAlex
02/19/2025, 9:48 AMAndrew Reed
02/19/2025, 9:49 AMgem uninstall cocoapods
Andrew Reed
02/19/2025, 9:49 AMFrançois
02/19/2025, 9:49 AMTired of CocoaPods, try using my alternative <https://frankois944.github.io/spm4Kmp/>
//End Instant promoFrançois
02/19/2025, 9:50 AMbrew
method is easier if you canAlex
02/19/2025, 9:56 AMgem uninstall cocoapods
sudo gem install -n /usr/local/bin cocoapods -v 1.16.2
but it didn't help :(Alex
02/19/2025, 9:59 AMbrew
.Andrew Reed
02/19/2025, 10:03 AMAmit Kairon
02/19/2025, 11:17 AMAlex
02/19/2025, 2:00 PMAndrew Reed
02/19/2025, 2:03 PMAndrew Reed
02/19/2025, 2:03 PMAlex
02/19/2025, 2:06 PMAndrew Reed
02/19/2025, 2:06 PMAlex
02/19/2025, 2:09 PMpod install
locally (in terminal) and it completed successfully.Alex
02/19/2025, 2:15 PMAlex
02/19/2025, 2:23 PMAndrew Reed
02/19/2025, 2:24 PMAndrew Reed
02/19/2025, 2:24 PMAlex
02/19/2025, 3:26 PMAndrew Reed
02/19/2025, 4:06 PMAndrew Reed
02/19/2025, 4:09 PMopen -n /Applications/Xcode-16.2.0.app
Andrew Reed
02/19/2025, 4:09 PMAndrew Reed
02/19/2025, 4:10 PMAlex
02/19/2025, 4:23 PMopen -n /Applications/Xcode.app
. The Xcode build failed with another error:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'base64' (>= 0) among 162 total gem(s) (Gem::MissingSpecError)
After that I performed gem list
and gem 'base64' was found. I think this gem exists for Ruby 3.5, but doesn't exist for system Ruby 2.6.Amit Kairon
02/20/2025, 8:42 AMAlex
02/20/2025, 8:47 AMFrançois
02/20/2025, 8:52 AMAndrew Reed
02/20/2025, 9:00 AMAlex
02/20/2025, 9:39 AMexport PATH="$PATH:$HOME/.rvm/bin"
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
export PATH="/Users/alex/.rvm/rubies/ruby-3.3.5/bin/ruby:$PATH"
Andrew Reed
02/20/2025, 9:41 AMAndrew Reed
02/20/2025, 9:41 AMrvm use 3
Andrew Reed
02/20/2025, 9:42 AMrvm --default use 3.3.5
Alex
02/20/2025, 9:46 AMso you are using rvm and ruby? - that last path?I use
rvm
.
I added this line because I thought it would help.Alex
02/20/2025, 9:46 AM=* ruby-3.3.5 [ arm64 ]
# => - current
# =* - current && default
# * - default
Andrew Reed
02/20/2025, 9:48 AMAndrew Reed
02/20/2025, 9:48 AMAndrew Reed
02/20/2025, 9:49 AMAndrew Reed
02/20/2025, 9:50 AMAndrew Reed
02/20/2025, 9:51 AMAndrew Reed
02/20/2025, 9:52 AMAlex
02/20/2025, 10:34 AM./gradlew :shared:podInstallSyntheticIos
in my terminal and after that Xcode built my project. 🎉
I'm not sure that it resolved my problem completely. I'm going to watch it.
Anyway thank you for your time.François
02/20/2025, 10:35 AMAndrew Reed
02/20/2025, 10:40 AMFrançois
02/20/2025, 10:40 AMAndrew Reed
02/20/2025, 10:41 AMFrançois
02/20/2025, 10:42 AMAndrew Reed
02/20/2025, 10:44 AMAndrew Reed
02/20/2025, 11:10 AMAlex
02/20/2025, 3:51 PM