I think I am getting crazy soon about brew vs Mac ...
# compose-ios
j
I think I am getting crazy soon about brew vs Mac OS, everytime update cocoapods or ruby something breaks. I always end up in this:
Copy code
Execution failed for task ':core:data:podInstallSyntheticIos'.
> Executing of 'env pod install' failed with code 1 and message: 
  
  
  
  /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/rubygems/specification.rb:1484:in `rescue in block in activate_dependencies': Could not find 'minitest' (>= 5.1) among 182 total gem(s) (Gem::MissingSpecError)
  Checked in 'GEM_PATH=/opt/homebrew/Cellar/fastlane/2.219.0_2/libexec:/opt/homebrew/Cellar/cocoapods/1.15.2/libexec' at: /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/specifications/activesupport-7.1.3.gemspec, execute `gem env` for more information
Tried re-install ruby, cocoapods, follow some odd configs in ~/.zshrc file etc. But nothing works. What should I do to successfully being able to use Ruby 3.3.0+ and Cocoapods on MacOS so I can build my iOS app properly? And yes minitest is installed but I think something is missing to specify GEM_PATH or something.
βœ… 1
kodee happy 1
d
You can try to use https://github.com/Kotlin/kdoctor tool to check your environment
j
Thanks, KDoctor does just says everything is green and ready, but its not πŸ˜• I tried using some odd tools like chruby and rbenv, but nothing helps. I think the main issue is gem installation is wrong, causing some odd gem and cocoapods setup. But I dont understand how I should install this, would expect homebrew solve this for me πŸ˜„ I mean should just be
brew install cocoapods
and nothing else, but no.
Before I tried using a hack with embedded Ruby version in Mac OS, which is like 2.6.1, but I cannot use it anymore as not compatible with gems I need to have πŸ˜„ But when installed Ruby 3.3.0 everything went uhm I dont know πŸ˜„
d
Also you can try to use different versions of Ruby
j
I dont care which Ruby version it is, just want it to work πŸ˜„ If there is any Ruby version being compatible with XCode pods and KMP setup, please tell me which version that is.
d
I am using ruby 3.2.2 for now
j
Also I am using M2 Mac Chip if that matters.
d
It should work on every Mac
j
Right, yeah I will try downgrade to 3.2.2 and see if that helps πŸ™‚ Is there any other cleanup I can do, to check Apple havent break something else in Paths or such? Apple often breaks environment when doing Mac OS updates πŸ˜„
d
If you will use new KMP wizard, there are no needs to use Ruby in you environment
But if you need to use cocoapods, you can configure your environment as in this article
πŸ‘ 1
j
Yeah I hate cocoapods and would like to not use it, but we dont have Swift / SPM yet πŸ˜› Thanks will check that article, missed that one existed πŸ™‚
πŸ‘ 1
@Dima Avdeev I dont know why it helped, but I uninstalled Ruby, Cocoapods and Fastlane from Homebrew. Then instead using rbenv to install explicit version of Ruby, and then install fastlane and cocoapods through gem install fastlane, cocoapods. Then suddenly everything working. Ah well, I guess cant use Ruby stuff in Homebrew on Mac OS πŸ˜›
πŸŽ‰ 3
Thanks for input! πŸ™‚
295 Views