简体   繁体   English

由于捆绑器导致黄瓜在Docker容器中失败

[英]Cucumber failing in docker container because of bundler

We have a cucumber/selenium regression pack which is written in ruby and runs using Rakefile. 我们有一个用红宝石编写并使用Rakefile运行的黄瓜/硒回归包。 When I run regression pack locally on my machine, everything works fine. 当我在计算机上本地运行回归包时,一切正常。 However we need this to be running in container so we can hook it up to our CI pipeline. 但是,我们需要在容器中运行它,以便可以将其连接到CI管道。 Therefore we are building a docker container. 因此,我们正在构建一个docker容器。 I am building my docker image FROM ruby:2.3, then I run: 我正在从ruby:2.3构建我的docker镜像,然后运行:

bundle install --without development test

Which works fine. 哪个工作正常。 All the dependencies from the Gemfile are installed. Gemfile中的所有依赖项都已安装。 Including cucumber & selenium. 包括黄瓜和硒。 Then I execute rake task to run Cucumber and I see this error: 然后,我执行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>'

And I don't know why as clearly bundler is install as I am using it to install all the dependencies and cucumber it self. 而且我不知道为什么要像安装捆绑程序那样清楚地安装所有依赖项并自行安装它。

Anyone seen this before? 有人看过吗?

Update: 更新:

I found issue on GitHub reffering to very particular incompability . 我在GitHub上发现了与非常特殊的不兼容性有关的问题

At the moment as I mentioned in the update above ( link ) there is no great solution to this problem available however rolling back with: 目前,正如我在上面的更新( 链接 )中提到的那样,尚无解决此问题的好方法,但是回滚:

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

Solved my issue. 解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM