【问题标题】:Cucumber failing in docker container because of bundler由于捆绑器,黄瓜在 docker 容器中失败
【发布时间】:2016-05-12 11:10:09
【问题描述】:

我们有一个用 ruby​​ 编写并使用 Rakefile 运行的黄瓜/硒回归包。当我在我的机器上本地运行回归包时,一切正常。但是,我们需要它在容器中运行,以便我们可以将它连接到我们的 CI 管道。因此,我们正在构建一个 docker 容器。我正在从 ruby​​:2.3 构建我的 docker 映像,然后运行:

bundle install --without development test

效果很好。 Gemfile 中的所有依赖项都已安装。包括黄瓜和硒。然后我执行 rake 任务来运行 Cucumber,我看到了这个错误:

/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.12.3/lib/bundler/rubygems_integration.rb:373:in `block in replace_bin_path': can't find executable bundle (Gem::Exception)
from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems.rb:278:in `activate_bin_path'
from /usr/local/bin/bundle:22:in `<main>'

而且我不知道为什么要安装捆绑器,因为我使用它来安装所有依赖项并自行安装黄瓜。

有人见过这个吗?

更新:

我在 GitHub 上发现问题涉及非常特殊的 incompability

【问题讨论】:

    标签: ruby docker rubygems cucumber bundler


    【解决方案1】:

    目前,正如我在上面的更新 (link) 中提到的那样,这个问题没有很好的解决方案,但是可以通过以下方式回滚:

    gem update --system 2.6.1
    gem install bundler --version $BUNDLER_VERSION
    

    解决了我的问题。

    【讨论】:

      猜你喜欢
      • 2016-07-24
      • 1970-01-01
      • 2011-04-14
      • 1970-01-01
      • 1970-01-01
      • 2016-11-27
      • 1970-01-01
      • 2023-02-10
      • 1970-01-01
      相关资源
      最近更新 更多