Tuesday, May 14, 2024
175
rated 0 times [  180] [ 5]  / answers: 1 / hits: 12007  / 2 Years ago, wed, november 2, 2022, 12:00:00

✖ Installing Bundler
error Your Ruby version is 2.6.8, but your Gemfile specified 2.7.4


✖ 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.


But my Ruby version is 2.7.5


I tried run below commands:


yarn global remove react-native-cli "after install again"
rvm install ruby/latest
npm install -g @react-native/cli

But nothing works :(


More From » react-native

 Answers
1

I used RVM to install ruby and restarted the terminal. It worked.


Use this to install RVM:


curl -sSL https://get.rvm.io | bash -s stable

Install the ruby version you would like (2.7.5 in this case):


rvm install 2.7.5

This is an open issue in the RN repo. Looks like react-native-cli just cannot figure out that the Ruby version is indeed correct. You can avoid the CLI command by going to the project directory and running:


bundle install
cd ios && bundle exec pod install

Link


[#16] Saturday, August 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
donaldcristianl

Total Points: 114
Total Questions: 95
Total Answers: 110

Location: Bonaire
Member since Sat, May 27, 2023
1 Year ago
donaldcristianl questions
Mon, Oct 19, 20, 00:00, 4 Years ago
Tue, Jan 28, 20, 00:00, 4 Years ago
Mon, Dec 16, 19, 00:00, 5 Years ago
;