skip to Main Content

I know similar questions exist.

I’ve gone through most of them but, so far, none of the solutions worked.

Here is the context:

Operating system: macOS Ventura 13.0.1 (Intel processor)

Here are some commands output:

$ ruby -v
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin22]
$ which ruby
/Users/..../.rbenv/shims/ruby
$  bundler -v
Bundler version 2.3.26
$ which bundler
/Users/..../.rbenv/shims/bundler

My ~/.bash_profile and ~/.zshrc contain:

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/shims:$PATH"
eval "$(rbenv init -)"

I know nothing about ruby, I’m using rbenv to manage ruby versions.

I’ve done a similar setup on another macOS system but for some reason, on this system, nothing I have tried works.

Any helps is appreciated.

Thanks.

2

Answers


  1. Chosen as BEST ANSWER

    I've managed to make it work.

    I'm not sure what did it.

    I've upgraded node from 14 to 19 which also upgraded react-native to 0.70.6

    Also, I've added if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi to .bash_profile and .zshrc


  2. In the directory where you run npx react-native init, try following code :

    rbenv init
    rbenv shell 2.7.5
    eval "$(rbenv init - bash)";
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search