美文网首页
执行fastlane打包命令报错

执行fastlane打包命令报错

作者: 骑马纵天下 | 来源:发表于2020-03-16 17:22 被阅读0次

执行 fastlane release命令报错:

Could not find proper version of fastlane (2.138.0) in any of the sources
Run `bundle install` to install missing gems.

继续执行bundle install命令报错:

Could not fetch specs from https://rubygems.org/

问题是gem环境我已经设置成https://gems.ruby-china.com了,但是安装的时候还是从https://rubygems.org/环境获取。

Fetching source index from https://rubygems.org/

解决办法:

一个简单的解决办法就是直接修改项目目录下的Gemfile文件里面的source。

image.png

最后在https://gems.ruby-china.com找到解决办法:

如果你使用 Gemfile 和 Bundler的项目,可以按照下面命令修改 (例如:Rails 项目)

你可以用 Bundler 的 Gem 源代码镜像命令。

//执行这个命令 https://gems.ruby-china.com 替代 https://rubygems.org

//执行过这个命令后会生成config文件 前提是以前你没有这个文件如果有就是修改

//这个是全局设置修改的是 ~/.bundle/config文件中的内容

$ bundle config mirror.https://rubygems.org https://gems.ruby-china.com

这样你不用改你的 Gemfile 的 source。

source 'https://rubygems.org/'

gem 'rails', '4.2.5'

...
image.png

最后在去执行命令就会是从https://gems.ruby-china.com环境获取资源

image.png

删除Bundle的一个镜像源

Bundle config —delete ‘mirror.https://rubygems.org'

相关文章

网友评论

      本文标题:执行fastlane打包命令报错

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