由于捆绑器,Cucumber 在 docker 容器中失败
Cucumber failing in docker container because of bundler
我们有一个 cucumber/selenium 回归包,它是使用 Rakefile 在 ruby 和 运行 中编写的。当我 运行 在我的机器上进行本地回归包时,一切正常。但是,我们需要将其 运行 放入容器中,以便我们可以将其连接到我们的 CI 管道。因此我们正在构建一个 docker 容器。我正在从 ruby:2.3 构建我的 docker 图像,然后我 运行:
bundle install --without development test
效果很好。 Gemfile 中的所有依赖项都已安装。包括黄瓜和硒。然后我对 运行 Cucumber 执行 rake 任务,我看到这个错误:
/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>'
而且我不知道为什么要安装 bundler,因为我正在使用它来安装所有依赖项并自行安装 cucumber。
有人以前看过吗?
更新:
我在 GitHub 上发现问题涉及非常特殊的 incompability。
正如我在上面的更新中提到的那样 (link) 目前还没有很好的解决这个问题的方法,但是回滚:
gem update --system 2.6.1
gem install bundler --version $BUNDLER_VERSION
解决了我的问题。
我们有一个 cucumber/selenium 回归包,它是使用 Rakefile 在 ruby 和 运行 中编写的。当我 运行 在我的机器上进行本地回归包时,一切正常。但是,我们需要将其 运行 放入容器中,以便我们可以将其连接到我们的 CI 管道。因此我们正在构建一个 docker 容器。我正在从 ruby:2.3 构建我的 docker 图像,然后我 运行:
bundle install --without development test
效果很好。 Gemfile 中的所有依赖项都已安装。包括黄瓜和硒。然后我对 运行 Cucumber 执行 rake 任务,我看到这个错误:
/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>'
而且我不知道为什么要安装 bundler,因为我正在使用它来安装所有依赖项并自行安装 cucumber。
有人以前看过吗?
更新:
我在 GitHub 上发现问题涉及非常特殊的 incompability。
正如我在上面的更新中提到的那样 (link) 目前还没有很好的解决这个问题的方法,但是回滚:
gem update --system 2.6.1
gem install bundler --version $BUNDLER_VERSION
解决了我的问题。