Requirement to run apparition in Docker with CI?

I am trying to run rspec tests with capybara and apparition in docker in my CI. I have installed google-chrome-stable, but receive crazy errors.

If I just run my rspec it will start puma to execute tests and then just hand for a more than 10 mins.

Crazyness is that if I add rspec filter or exclude pattern all my test spec is failing with errors provided below.

I am running rails 6.0.0rc2 with latest versions of everything (rspec-rails, capybara, apparition)

If I run tests on CI without full tests with apparition everything works fine.

I googled for this Could not load native IDN implementation. and tried to clear cache of my CI workers, but it does not help.

I build my image with this docker file

FROM ruby:2.6-stretch

ENV LANG C.UTF-8

ARG PG_MAJOR=11
ARG NODE_MAJOR=10
ARG BUNDLER_VERSION=2.0.2
ARG YARN_VERSION=1.17.3

# Add PostgreSQL to sources list
RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - 
  && echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list

# Add NodeJS to sources list
RUN curl -sL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash -

# Add Yarn to the sources list
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - 
  && echo 'deb http://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list

# Add chrome keys
RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && 
    echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list

RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade && 
    DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends 
    build-essential 
    ca-certificates 
    curl 
    gnupg 
    gnupg1 
    patch 
    google-chrome-stable 
    postgresql-client-$PG_MAJOR 
    nodejs 
    xz-utils 
    yarn=$YARN_VERSION-1 
    zlib1g-dev && 
    apt-get clean && 
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && 
    truncate -s 0 /var/log/*log && 
    gem update --system && 
    groupadd --gid 1000 node && 
    useradd --uid 1000 --gid node --shell /bin/bash --create-home node

RUN gem update --system && 
    gem install bundler:$BUNDLER_VERSION

RUN mkdir -p /app

WORKDIR /app

Here is the log from my CI

bundle exec rspec --color --tty --tag "~js" .[0;m
Could not load native IDN implementation.

An error occurred while loading ./vendor/ruby/2.6.0/gems/addressable-2.6.0/spec/addressable/rack_mount_compat_spec.rb.
[31mFailure/Error: raise(Bootsnap::LoadPathCache::CoreExt.make_load_error(path))[0m
[31m[0m
[31mLoadError:[0m
[31m  cannot load such file -- rack/mount[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:33:in `require'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/zeitwerk-2.1.9/lib/zeitwerk/kernel.rb:23:in `require'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/addressable-2.6.0/spec/addressable/rack_mount_compat_spec.rb:23:in `<main>'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/configuration.rb:2053:in `load_file_handling_errors'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/configuration.rb:1560:in `block in load_spec_files'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/configuration.rb:1558:in `each'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/configuration.rb:1558:in `load_spec_files'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:98:in `setup'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:86:in `run'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:71:in `run'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:45:in `invoke'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/exe/rspec:4:in `<top (required)>'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/bin/rspec:23:in `load'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/bin/rspec:23:in `<top (required)>'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:74:in `load'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:28:in `run'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:463:in `exec'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:27:in `dispatch'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:18:in `start'[0m
[36m# /usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'[0m
[36m# /usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'[0m
[36m# /usr/local/bundle/bin/bundle:23:in `load'[0m
[36m# /usr/local/bundle/bin/bundle:23:in `<main>'[0m
[36m# [0m
[36m#   Showing full backtrace because every line was filtered out.[0m
[36m#   See docs for RSpec::Configuration#backtrace_exclusion_patterns and[0m
[36m#   RSpec::Configuration#backtrace_inclusion_patterns for more information.[0m

Here is the log from my CI

bundle exec rspec --color --tty --tag "~js" .[0;m
Could not load native IDN implementation.

An error occurred while loading ./vendor/ruby/2.6.0/gems/addressable-2.6.0/spec/addressable/rack_mount_compat_spec.rb.
[31mFailure/Error: raise(Bootsnap::LoadPathCache::CoreExt.make_load_error(path))[0m
[31m[0m
[31mLoadError:[0m
[31m  cannot load such file -- rack/mount[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:33:in `require'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/zeitwerk-2.1.9/lib/zeitwerk/kernel.rb:23:in `require'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/addressable-2.6.0/spec/addressable/rack_mount_compat_spec.rb:23:in `<main>'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/configuration.rb:2053:in `load_file_handling_errors'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/configuration.rb:1560:in `block in load_spec_files'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/configuration.rb:1558:in `each'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/configuration.rb:1558:in `load_spec_files'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:98:in `setup'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:86:in `run'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:71:in `run'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:45:in `invoke'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/gems/rspec-core-3.8.2/exe/rspec:4:in `<top (required)>'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/bin/rspec:23:in `load'[0m
[36m# /builds/prj/prj/vendor/ruby/2.6.0/bin/rspec:23:in `<top (required)>'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:74:in `load'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli/exec.rb:28:in `run'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:463:in `exec'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:27:in `dispatch'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/cli.rb:18:in `start'[0m
[36m# /usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/exe/bundle:30:in `block in <top (required)>'[0m
[36m# /usr/local/lib/ruby/site_ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'[0m
[36m# /usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/exe/bundle:22:in `<top (required)>'[0m
[36m# /usr/local/bundle/bin/bundle:23:in `load'[0m
[36m# /usr/local/bundle/bin/bundle:23:in `<main>'[0m
[36m# [0m
[36m#   Showing full backtrace because every line was filtered out.[0m
[36m#   See docs for RSpec::Configuration#backtrace_exclusion_patterns and[0m
[36m#   RSpec::Configuration#backtrace_inclusion_patterns for more information.[0m
...
Run options: exclude {:js=>true}

Randomized with seed 1270


Finished in 6.04 seconds (files took 5.89 seconds to load)
0 examples, 0 failures, 188 errors occurred outside of examples

Thing is I have only 5 test examples, so it looks like this failing tests are from something internal

Any ideas how to find out why I get all these crazy errors?

Source: StackOverflow