Skip to content

--without development,test being ignored on bundle install #40

@stuartluscombe

Description

@stuartluscombe

Issue:
When deploying a Rails app with the Ruby 2.6.2 image I'm finding that gems I have within the development and test groups of my Gemfile are being installed despite having the application setting BUNDLE_WITHOUT set.

At the point of pushing my code to the azure remote and the build starts it does say it's running it with --without development,test, but I can clearly see that the gems are being fetched and installed.

Gemfile:

group :development do
  # Access an interactive console on exception pages or by calling 'console'
  # anywhere in the code.
  gem 'listen', '>= 3.0.5', '< 3.2'
  gem 'web-console', '>= 3.3.0'
  # Spring speeds up development by keeping your application running in the
  # background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'

  # Use Solargraph for Intellisense, linting etc.
  gem 'solargraph'

  # Add rubocop-rails to get rubocop working nicely with Rails.
  gem 'rubocop-rails'

  # Better errors
  gem 'better_errors'
  gem 'binding_of_caller'
end

Deploy output:

...
remote: Bundle install with options --without development,test
...
remote: Fetching better_errors 2.5.1
remote: Installing better_errors 2.5.1
...
remote: Fetching solargraph 0.38.5
remote: Installing solargraph 0.38.5
...
remote: Gems in the group development,test were not installed.
...

Steps to reproduce:

  1. Set up a new Ruby on Rails app and add some gems to the development and/or test sections of the Gemfile.
  2. Set up a new Web App using the Ruby 2.6.2 image
  3. Add the BUNDLE_WITHOUT setting to exclude "development,test" (as per the MS documentation)
  4. Push the app to Azure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions