[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
same warnings here with Bundler 2.1.4
And bundle:clean
fails with :
$ /usr/local/rbenv/shims/bundle clean --without development test --path "vendor/bundle" --deployment
Unknown switches "--without", "--path", "--deployment"
! ERROR: Deploy failed.
Any further info on this?
For anyone arriving here, I am using the following solution:
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. I would be happy to write a patch for this if it is something that will get merged.
Blog post here: Mina deployments causing Bundler depreciation warnings.
This would break for anyone using Bundler 1.
And I'm not sure Mina team wants to handle a code with an if bundler_1? do xxx esle do yyy
An opinion from them would help the direction of a PR
@Haelle Surely compatibility with the latest stable Bundler would be preferable, as upgrades are recommended. Mina could recommend a newer and therefore more stable version of Bundler. Currently Mina is unusable with the latest production Bundler.
+1
Hi @thelucid can you explain that more detailed.
where is this set :bundle_options, -> { '' } options?
and to where i will add above commands. i am using gitlab runner and fastline for the app distribution. so i have gitlab-ci.yml file here a script like
@thelucid said:
For anyone arriving here, I am using the following solution:
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. I would be happy to write a patch for this if it is something that will get merged.
Doesn't it make more sense to use:
namespace :bundle do
desc 'Sets the Bundler config options.'
task :config do
comment %{Setting the Bundler config options}
command %{#{fetch(:bundle_bin)} config set --local deployment 'true'}
command %{#{fetch(:bundle_bin)} config set --local path '#{fetch(:bundle_path)}'}
command %{#{fetch(:bundle_bin)} config set --local without '#{fetch(:bundle_withouts)}'}
end
end
… on every deploy (notice the --local
)? For instance, I can imagine the without
changing between releases.
Most helpful comment
@Haelle Surely compatibility with the latest stable Bundler would be preferable, as upgrades are recommended. Mina could recommend a newer and therefore more stable version of Bundler. Currently Mina is unusable with the latest production Bundler.