美文网首页
react-native工程执行bundler install挂

react-native工程执行bundler install挂

作者: kongxx | 来源:发表于2024-06-11 16:01 被阅读0次

    react-native工程默认执行 “bundler install” 命令时,会出现挂死或超时问题,原因懂的都懂。

    解决办法:

    先查看一下 gem 源

    $ gem sources -l
    *** CURRENT SOURCES ***
    
    https://rubygems.org/
    

    修改 gem 源

    gem sources --remove https://rubygems.org/ 
    
    gem sources --add https://gems.ruby-china.com/
    gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/
    

    查看一下修改

    gem sources -l
    *** CURRENT SOURCES ***
    
    https://gems.ruby-china.com/
    https://mirrors.tuna.tsinghua.edu.cn/rubygems/
    

    修改 bundle 配置(这一步是不是必须待验证)

    bundle config mirror.https://rubygems.org https://gems.ruby-china.com
    或
    bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems
    

    然后重新运行 “bundler install”。

    相关文章

      网友评论

          本文标题:react-native工程执行bundler install挂

          本文链接:https://www.haomeiwen.com/subject/bntgqjtx.html