【发布时间】:2015-04-23 14:06:58
【问题描述】:
我从项目的 Gemfile 中删除了 gem“auto_tagger”。一切看起来都在 master/dev 分支上工作。我使用脚本将分支合并到测试中。现在我收到此错误
Switched to branch 'test'
/opt/mount1/rvm/gems/ruby-2.1.1@global/gems/bundler-1.7.7/lib/bundler/resolver.rb:357:in `resolve': Could not find gem 'auto_tagger (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
当下面的脚本被调用时(这不是完整的脚本,但它显示了失败的地方)
def chef_refresh(root_dir = nil, environment = 'staging', branch)
dir_prefix = root_dir.nil? ? nil : File.join(root_dir, '/')
check_environment(environment)
puts "Checking out #{branch} inside the something_chef_repo projects."
system("git checkout #{branch}")
check_branch(environment, branch)
puts "git pull something_chef_repo"
system("git pull") || raise("unable to complete git pull for gemini_chef_repo")
puts "running bundle"
system("bundle")
puts "running berks"
system("berks install")
【问题讨论】:
-
为什么要删除一个明显被您的应用程序使用的 gem?问题是关于如何完全删除或如何使其再次工作?
-
此 gem 必须在您当前工作目录(“test”分支)的
Gemfile中引用。如果您没有使用该 gem,请适当更新Gemfile。如果您需要宝石(我怀疑),请使用bundle install将其取回。 -
不再需要 gem。我正在尝试完全删除它。在我们的环境中,我们使用 jenkins 将 master 的分支合并到 test 到 stage 和 prod。在每个合并过程之后,都会运行脚本以执行主厨刷新。在厨师刷新脚本期间,事情会爆炸。
-
当我从 master/dev 分支的 gemfile 中删除 gem 并将分支合并到 test 时,它是否没有更新 test 分支上的 gemfile?
标签: ruby git chef-infra