How to disable 'bundle check'?

ruby
circle.yml

#1

We use a private gem in our application, which is located at a private gem server.
There is no access to that gem server outside of VPC.
We put them into a group called “private” and tell circleci bundler to ignore that group.
circleci.yml:

dependencies:
  bundler:
    without: [production, staging, private]

But circleci also run bundle check before bundle install and it tries to install all the missing gems.


#2

This might be a post you wrote on Stackoverflow, since your names are similar. I’m just reposting the workaround here for anyone else with this problem. Using this in the Gemfile will ensure the gem is ignored on CircleCI:

if !ENV['CIRCLECI']
  source 'http://your-private-address' do
    gem 'your_private_gem'
  end
end

#3

Another option is to use bundle config without followed by a list of groups that you wish to exclude, e.g.:

dependencies:
  pre:
    - bundle config without development:production

This would ignore the ‘development’ and ‘production’ groups.

(For extra info here’s a great post: Configuring bundler using bundle config)


#4