skip to Main Content

As the image shows, I can’t finish the generation because it shows an error in Ruby, but I already updated it and even so it doesn’t work. It shows the difference between the folders.

Downloading template
✔ Copying template
✔ Processing template
✖ Installing Bundler
error /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin22/rbconfig.rb:21: warning: Insecure world writable dir /Users/jcs/projetos in PATH, mode 040777
Your RubyGems version (3.0.3.1) has a bug that prevents required_ruby_version from working for Bundler. Any scripts that use gem install bundler will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running gem update --system 3.2.3
Your Ruby version is 2.6.10, 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 (/usr/local/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/init/init.js:131:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.initialize [as func] (/usr/local/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/init/init.js:184:3)
at async Command.handleAction (/usr/local/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:106:9)
info Run CLI with –verbose flag for more details.
jcs@Junios-Mac-Studio projetos % ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin22]
jcs@Junios-Mac-Studio projetos %

enter image description here

I’ve tried almost everything

2

Answers


  1. I got the same error few days ago whenever i tried to create a React-Native CLI project and i think it’s because of the different ruby version available in your system.

    First of all please check the ruby versions installed on your device by running the rvm list in your terminal. It shows the installed ruby versions in your system and also shows which one is set to default and which is in current use.

    So my advice is that you want to uninstall the ruby from your system and try to re-install from start. I did the same and my error gets solved.

    Here i attached one Youtube video link which i followed to install the Ruby and Gems: https://youtu.be/wnZzWIKS0tY

    Login or Signup to reply.
  2. I struggled with this issue for 3 days and fix it

    This steps work for me perfectly to create react native project without error

    1- npx react-native init testproject –skip-install -—npm

    2- cd testproject

    3- npm install or yearn install

    4- cd ios

    5- bundle config –local build.ffi –with-cflags=-Wno-error=implicit-function-declaration

    6- bundle install

    7- bundle exec pod install

    For more information about it please check this link

    For More information about versions and complete error please check this link too

    all my mac inforamtion and errors images are in shared links

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search