Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ruby version check for RN CLI Doctor #1818

Merged
merged 6 commits into from
Feb 10, 2023

Conversation

arushikesarwani94
Copy link
Contributor

@arushikesarwani94 arushikesarwani94 commented Feb 5, 2023

Summary:

Adding the check for Ruby version required for React Native app.
Minimum version needed >= 2.7.6

Test Plan:

  1. Build cli codebase using : node ./scripts/build.js && yarn build:debugger
  2. Link the cli-doctor using : yarn link
(base) arushikesarwani@arushikesarwani-mbp cli-doctor % yarn link
yarn link v1.22.10
success Registered "@react-native-community/cli-doctor".
info You can now run `yarn link "@react-native-community/cli-doctor"` in the projects where you want to use this package and it will be used instead.
✨  Done in 0.04s.
  1. In the example React Native app(Awesome Project), run yarn link "@react-native-community/cli-doctor"
  2. Run the CLI Doctor using : npx @react-native-community/cli doctor

Before :

(base) arushikesarwani@arushikesarwani-mbp AwesomeProject % npx @react-native-community/cli doctor
Common
 ✓ Node.js
 ✓ yarn
 ✓ Watchman - Used for watching changes in the filesystem when in development mode

Android
 ✖ JDK
   - Version found: 1.8.0_181
   - Version supported: >= 11
 ✓ Android Studio - Required for building and installing your app on Android
 ✖ Android SDK - Required for building and installing your app on Android
   - Versions found: 30.0.3
   - Version supported: 33.0.0
 ✖ ANDROID_HOME

iOS
 ✓ Xcode - Required for building and installing your app on iOS
 ✖ CocoaPods - Required for installing iOS test dependencies
   - Version found: N/A
   - Version supported: >= 1.10.0
 ● ios-deploy - Required for installing your app on a physical device with the CLI
 ✓ .xcode.env - File to customize Xcode environment

Errors:   4
Warnings: 1

Usage
 › Press f to try to fix issues.
 › Press e to try to fix errors.
 › Press w to try to fix warnings.
 › Press Enter to exit.

After :

WARNING -

(base) arushikesarwani@arushikesarwani-mbp AwesomeProject % npx @react-native-community/cli doctor
Common
 ✓ Node.js
 ● Ruby
 ✓ yarn
 ✓ Watchman - Used for watching changes in the filesystem when in development mode
Android
 ✖ JDK
   - Version found: 1.8.0_181
   - Version supported: >= 11
 ✓ Android Studio - Required for building and installing your app on Android
 ✖ Android SDK - Required for building and installing your app on Android
   - Versions found: 30.0.3
   - Version supported: 33.0.0
 ✖ ANDROID_HOME
iOS
 ✓ Xcode - Required for building and installing your app on iOS
 ✖ CocoaPods - Required for installing iOS dependencies
   - Version found: N/A
   - Version supported: >= 1.10.0
 ● ios-deploy - Required for installing your app on a physical device with the CLI
 ✓ .xcode.env - File to customize Xcode environment
Errors:   4
Warnings: 2
Usage
 › Press f to try to fix issues.
 › Press e to try to fix errors.
 › Press w to try to fix warnings.
 › Press Enter to exit.

SUCCESS -

(base) arushikesarwani@arushikesarwani-mbp AwesomeProject % npx @react-native-community/cli doctor
Common
 ✓ Node.js
 ✓ yarn
 ✓ Ruby
 ✓ Watchman - Used for watching changes in the filesystem when in development mode
Android
 ✖ JDK
   - Version found: 1.8.0_181
   - Version supported: >= 11
 ✓ Android Studio - Required for building and installing your app on Android
 ✖ Android SDK - Required for building and installing your app on Android
   - Versions found: 30.0.3
   - Version supported: 33.0.0
 ✖ ANDROID_HOME
iOS
 ✓ Xcode - Required for building and installing your app on iOS
 ✖ CocoaPods - Required for installing iOS test dependencies
   - Version found: N/A
   - Version supported: >= 1.10.0
 ● ios-deploy - Required for installing your app on a physical device with the CLI
 ✓ .xcode.env - File to customize Xcode environment
Errors:   4
Warnings: 1
Usage
 › Press f to try to fix issues.
 › Press e to try to fix errors.
 › Press w to try to fix warnings.
 › Press Enter to exit.

@arushikesarwani94 arushikesarwani94 requested review from adamTrz and thymikee and removed request for thymikee and adamTrz February 8, 2023 13:55
@adamTrz adamTrz changed the title Ruby version check for RN CLI Doctor feat: ruby version check for RN CLI Doctor Feb 8, 2023
Copy link
Collaborator

@adamTrz adamTrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and all works as expected :)

@adamTrz adamTrz merged commit abc1397 into react-native-community:main Feb 10, 2023

logManualInstallation({
healthcheck: 'Ruby',
url: 'https://reactnative.dev/docs/environment-setup#ruby',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arushikesarwani, when I go to https://reactnative.dev/docs/environment-setup#ruby it only takes me to the correct place if I have previously opened the "React Native CLI Quickstart" tab (and all the other tabs underneath it) and the Ruby heading is visible. Otherwise it is a broken link.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, unfortunately, that's a problem with the current website and how docusaurus handles deeplink with tabs. I think we need to change the website design to ease the usage of links with anchors like this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, unfortunately, that's a problem with the current website and how docusaurus handles deeplink with tabs. I think we need to change the website design to ease the usage of links with anchors like this.

Think its related to #1767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants