I am running into issues when attempting to use latest bundler (2.1.4) with docker. Even when checking bundler’s version I get errors:
#!/bin/bash -eo pipefail bundle -v Traceback (most recent call last): 2: from /usr/local/bin/bundle:23:in `<main>' 1: from /usr/local/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path' /usr/local/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /home/circleci/project/Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run `bundle update --bundler`. To install the missing version, run `gem install bundler:2.1.4`
This is even after I have stripped down my config.yml to almost nothing (bundler version script taken from here:
version: 2 jobs: build: docker: - image: circleci/ruby:2.6.5 steps: - checkout - run: name: Force Bundler Version command: | echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV source $BASH_ENV gem install bundler - run: name: Do Anything Bundler Related command: bundler -v
Nothing seems to work and it looks like everything is installed correctly (ssh-ed onto the container and the bundler gem/corresponding version is definitely there).