From 74066d706bd902b4abcccab9d38941d284a659b2 Mon Sep 17 00:00:00 2001 From: vish9812 Date: Fri, 24 Jul 2026 13:21:23 +0530 Subject: [PATCH 1/2] mobile: bump required Ruby to 3.2.11, add rv note for Apple Silicon Bumps the required Ruby version to match .ruby-version (3.2.11) and documents rv as an alternative to RVM, which hits repeated OpenSSL errors on recent Apple Silicon Macs. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../mobile/developer-setup/_index.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/site/content/contribute/more-info/mobile/developer-setup/_index.md b/site/content/contribute/more-info/mobile/developer-setup/_index.md index 24e9339309..df1c19fe8d 100644 --- a/site/content/contribute/more-info/mobile/developer-setup/_index.md +++ b/site/content/contribute/more-info/mobile/developer-setup/_index.md @@ -104,7 +104,7 @@ Install {{< newtabref href="https://apps.apple.com/us/app/xcode/id497799835?ls=1 ### Install Ruby -A version of Ruby is automatically installed on macOS, but Mattermost React Native app development requires Ruby 3.2.0. You can check the current version of Ruby by running the following command. +A version of Ruby is automatically installed on macOS, but Mattermost React Native app development requires the Ruby version pinned in the repository's `.ruby-version` file (currently 3.2.11). You can check the current version of Ruby by running the following command. ```sh ruby --version ``` @@ -126,13 +126,24 @@ If it isn't, we recommend using [Ruby Version Manager](https://rvm.io) or your p ``` 4. Install the required version of Ruby ```sh - rvm install 3.2.0 + rvm install 3.2.11 ``` -5. (Optional) If you don't need to use a different version of Ruby for anything else, you'll want to change the default version of Ruby. Without this, you'll need to run `rvm use 3.2.0` any time you want to work on the mobile app. +5. (Optional) If you don't need to use a different version of Ruby for anything else, you'll want to change the default version of Ruby. Without this, you'll need to run `rvm use 3.2.11` any time you want to work on the mobile app. ```sh - rvm alias create default 3.2.0 + rvm alias create default 3.2.11 ``` +{{}} +On recent Apple Silicon Macs, installing Ruby through RVM can fail with repeated OpenSSL errors. If you hit those, [`rv`](https://github.com/spinel-coop/rv) (a Ruby version manager) is a reliable alternative: + +```sh +brew install rv +rv ruby install 3.2.11 +``` + +`rv` reads the repository's `.ruby-version` file, so it selects the pinned version automatically when you `cd` into the project. +{{}} + ## Additional setup for Android ### Download and install Android Studio or Android SDK CLI tools From a464ab237b62013f23ff13a5250d8e11334b677c Mon Sep 17 00:00:00 2001 From: vish9812 Date: Fri, 24 Jul 2026 13:30:29 +0530 Subject: [PATCH 2/2] docs: document rv shell integration before auto-switching rv only switches Ruby versions on cd after its shell hook is installed. Add the `eval "$(rv shell init zsh)"` setup step so the automatic switching claim holds. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../contribute/more-info/mobile/developer-setup/_index.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/site/content/contribute/more-info/mobile/developer-setup/_index.md b/site/content/contribute/more-info/mobile/developer-setup/_index.md index df1c19fe8d..316bf9f107 100644 --- a/site/content/contribute/more-info/mobile/developer-setup/_index.md +++ b/site/content/contribute/more-info/mobile/developer-setup/_index.md @@ -141,7 +141,13 @@ brew install rv rv ruby install 3.2.11 ``` -`rv` reads the repository's `.ruby-version` file, so it selects the pinned version automatically when you `cd` into the project. +To have `rv` switch Ruby versions automatically, install its shell integration once. For example, for `zsh`: + +```sh +echo 'eval "$(rv shell init zsh)"' >> ~/.zshrc +``` + +Run `rv shell ` (`bash`, `fish`, etc.) to see the equivalent for your shell, then open a new terminal. After that, `rv` reads the repository's `.ruby-version` file and selects the pinned version automatically when you `cd` into the project. {{}} ## Additional setup for Android