thecodingmachine / react-native-boilerplate

A React Native template for building solid applications πŸ™, using JavaScript πŸ’› or Typescript πŸ’™ (you choose).
https://thecodingmachine.github.io/react-native-boilerplate/
MIT License
4.75k stars 864 forks source link

[BUG]: error using init command #352

Closed jprado closed 1 year ago

jprado commented 1 year ago

react-native environment setup

Description

Got this error after running the install from template command:

npx react-native@latest init MyApp --template @thecodingmachine/react-native-boilerplate

βœ– Installing Bundler
error Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Your Ruby version is 3.2.2, but your Gemfile specified 2.7.6

βœ– Installing Bundler
error Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
Error: Error: Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/next/environment-setup and follow the React Native CLI QuickStart guide for macOS and iOS.
    at createFromTemplate (/Users/xxx/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/commands/init/init.js:131:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.initialize [as func] (/Users/xxx/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3)
    at async Command.handleAction (/Users/xxx/.npm/_npx/dea611a43221eddd/node_modules/@react-native-community/cli/build/index.js:106:9)

Version

3.6.5

On which OS this issue appear on?

Desktop OS

Ventura 13.3.1

JeremyDolle commented 1 year ago

The error seams clear : Your Ruby version is 3.2.2, but your Gemfile specified 2.7.6

The react native docs said :

React Native uses a .ruby-version file to make sure that your version of Ruby is aligned with what is needed. Currently, macOS 13.2 is shipped with Ruby 2.6.10, which is not what is required by this version of React Native (2.7.6)

So make sure to follow the ruby section of the Setting up the development environment docs and use ruby version 2.7.6