skip to Main Content

i am trying to run react-native iOS but when i’m opening vs code getting an error
Required ruby-2.7.4 is not installed.
To install do: ‘rvm install "ruby-2.7.4"’

i have system configuration

OS - macOS Monterey
MacBook Pro (Retina, 15-inch, Mid 2015)
Processor - 2.5 GHz Quad-Core Intel Core i7
Graphics - AMD Radeon R9 M370X 2 GB
Intel Iris Pro 1536 MB

when i’m installing ruby getting below error
enter image description here

2

Answers


  1. My advice is to try with with "rbenv". RVM can be quite troublesome sometimes.

    Installs with rbenv with brew:

    brew install rbenv ruby-build
    

    Configure your shell:

    # run this and follow the printed instructions:
    rbenv init
    

    Install the Ruby version you want:

    rbenv install 2.7.4
    

    Set the Ruby version

    rbenv global 3.1.2   # set the default Ruby version for this machine
    # or:
    rbenv local 3.1.2    # set the Ruby version for this directory
    
    Login or Signup to reply.
    • The error message you provided suggests that there’s an issue with the installation of the ffi gem, which is required by Ruby.

    • First, make sure that you have the latest version of Xcode and the Command Line Tools installed. You can install them by running the following commands in your terminal:

      xcode-select --install
      xcode-select -s /Applications/Xcode.app/Contents/Developer
      
    • Next,try installing the ffi gem manually by running the following command:

      sudo gem install ffi -v 1.13.1 -- --with-cflags="-Wno-error=implicit-function-declaration"
      
    • Recognition Issue with Cocoapods Gem on M1 Mac : https://copyprogramming.com/howto/cocoapods-gem-not-being-properly-recognized-on-m1-mac

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