我正在尝试使用带Fastlane的Slather。
我的项目宝石文件
source "https://rubygems.org"
gem "fastlane"
gem "slather"
我的Fastfile
platform :ios do
desc "Run unit tests"
lane :tests do
scan(workspace: "Home.xcworkspace", device: "iPhone 6s", scheme: "Home", code_coverage: true)
slather(
output_directory: "fastlane/html",
workspace: "Home.xcworkspace",
html: true,
scheme: "Home",
proj: "Home.xcodeproj",
ignore: [ "R.generated.swift", "Pods/*"],
verbose: true,
show: true
)
end
end
运行时,但是在运行我的测试并显示以下消息后失败
缺少宝石“ slather”,请将以下内容添加到本地Gemfile中:
在您的Gemfile中添加'gem“ slather”'并重新启动Fastlane
如果我运行gem install slather
,我会得到
Successfully installed slather-2.4.7
Parsing documentation for slather-2.4.7
Done installing documentation for slather after 0 seconds
1 gem installed
答案 0 :(得分:1)
在您的情况下,bundle exec fastlane ...
必须使用bundle exec fastlane tests
才能使Gemfile
生效。 (确保已运行bundle update
,以实际安装Gemfile的依赖项)