bunlde install 失败

新建了一个rails专案
rails new first_app
然后:cd first_app
接着:bundle install
失败,出现以下信息:
bogon:~ sujize$ cd first_app
bogon:first_app sujize$ bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java.
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from ‘https’ to ‘http’. Instructions for compiling with OpenSSL using
RVM are available at rvm.io/packages/openssl.
bogon:first_app sujize$

请问这如何解决呢?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
当出现yarn install失败时,有几种可能的解决方法可以尝试解决这个问题。首先,可以尝试清除本地缓存并重新下载依赖项。可以使用以下命令来清除缓存并重新安装依赖项: ``` yarn install --check-files --cache-folder .ycache && rm -rf .ycache ``` 如果在执行上述命令时出现了超时错误,可能是由于代理问题导致的。您可以尝试更改代理地址以解决此问题。您可以使用以下命令更改代理地址: ``` npm config set registry https://registry.npm.taobao.org npm config set disturl https://npm.taobao.org/dist ``` 更改完代理地址后,再次运行清除缓存并安装依赖项的命令: ``` yarn install --check-files --cache-folder .ycache && rm -rf .ycache ``` 如果上述方法仍然无法解决问题,您可以尝试直接使用npm来安装依赖项或降低yarn的版本。 此外,根据引用中提到的问题,当出现"The engine 'node' is incompatible with this module. Expected version"错误时,可以尝试切换到兼容的node版本来解决此问题。您可以安装多个node版本,并使用适合的版本来运行yarn install。 如果出现"unable to access 'https://github.com/nhn/raphael.git/'"错误,可以尝试删除package.json文件中与tui-editor相关的配置项,然后运行npm install --save tui-editor命令。 综上所述,当yarn install失败时,可以尝试以下解决方法: 1. 清除本地缓存并重新下载依赖项; 2. 更换代理地址后再次清除缓存并安装依赖项; 3. 直接使用npm安装依赖项或降低yarn版本; 4. 切换到兼容的node版本; 5. 删除相关配置项后重新安装依赖项。 希望这些方法能够帮助您解决yarn install失败的问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值