Jamie Hill
Photo of Jamie Hill

UX Designer, CSS Wizard, Ruby on Rails Developer.

Mina deployments causing Bundler depreciation warnings

Using recent Bundler versions with Mina currently results in the following depreciation notices:

[DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag
[DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag

Below is a solution to this problem, until it is fixed within Mina itself. You can view the Github issue here.

First I remove the default bundler options.

set :bundle_options, -> { '' }

Then I add the following to my setup task.

command "#{fetch(:bundle_bin)} config set deployment 'true'"
command "#{fetch(:bundle_bin)} config set path '#{fetch(:bundle_path)}'"
command "#{fetch(:bundle_bin)} config set without '#{fetch(:bundle_withouts)}'"

This solves the depreciation warnings and sets the bundle config globally.