Trying to setup the ENV for KMM but got stuck for a day for this issue.
I am unable to install ruby on my Mac Mini M1 chip
Environment diagnose:
[✓] Operation System
➤ Version OS: macOS 13.3.1
CPU: Apple M1
i You are currently using Rosetta 2.
It may cause some issues while trying to install packages using Homebrew.
Consider switching off Rosetta 2 or ignore this message in case you actually need it.
[✓] Java ➤ Java (java version "17.0.1" 2021-10-19 LTS) Location: /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home/bin/java i JAVA_HOME is not set Consider adding the following to ~/.zprofile for setting JAVA_HOME export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
[✓] Android Studio i Multiple Android Studio installations found ➤ Android Studio (AI-231.9225.16.2311.10647019) Location: /Users/ashutoshwahane/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/231.9225.16.2311.10647019/Android Studio Preview.app Bundled Java: openjdk 17.0.7 2023-04-18 Kotlin Plugin: 231-1.8.21-release-380-AS9225.16.2311.10647019 Kotlin Multiplatform Mobile Plugin: 0.6.1(231)-9 ➤ Android Studio (AI-223.8836.35.2231.10406996) Location: /Users/ashutoshwahane/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app Bundled Java: openjdk 17.0.6 2023-01-17 Kotlin Plugin: 223-1.8.0-release-345-AS8836.35.2231.10406996 Kotlin Multiplatform Mobile Plugin: 0.6.1(223)-18 i Note that, by default, Android Studio uses bundled JDK for Gradle tasks execution. Gradle JDK can be configured in Android Studio Preferences under Build, Execution, Deployment -> Build Tools -> Gradle section
[✓] Xcode ➤ Xcode (14.3.1) Location: /Applications/Xcode.app i Xcode JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home Xcode JAVA_HOME can be configured in Xcode -> Preferences -> Locations -> Custom Paths
[✖] Cocoapods ➤ ruby (ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]) ✖ System ruby is currently used CocoaPods is not compatible with system ruby installation on Apple M1 computers. Please install ruby via Homebrew, rvm, rbenv or other tool and make it default Detailed information: How to run CocoaPods on Apple Silicon (M1) ➤ ruby gems (3.0.3.1) ➤ cocoapods (1.12.1) ✖ CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.zprofile export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8
Recommendations: ➤ Update the kdoctor to the latest version: 1.0.1 brew upgrade kdoctor
➤ IDE doesn't suggest running all tests in file if it contains more than one class More details: https://youtrack.jetbrains.com/issue/KTIJ-22078 Conclusion: ✖ KDoctor has diagnosed one or more problems while checking your environment. Please check the output for problem description and possible solutions.
How to run CocoaPods on Apple Silicon (M1)
Tried this on stack over flow but didn't work.