Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting the following warnings when using bundler 2.1.2 #657

Closed
ghost opened this issue Jan 3, 2020 · 8 comments
Closed

Getting the following warnings when using bundler 2.1.2 #657

ghost opened this issue Jan 3, 2020 · 8 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 3, 2020

[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
@Haelle
Copy link

Haelle commented Mar 6, 2020

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.

@ghost
Copy link
Author

ghost commented Mar 7, 2020

Any further info on this?

@ghost
Copy link
Author

ghost commented Mar 7, 2020

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.

@Haelle
Copy link

Haelle commented Mar 7, 2020

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

@ghost
Copy link
Author

ghost commented Mar 7, 2020

@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.

@windy
Copy link

windy commented Mar 18, 2020

+1

@ibrahimyolbir
Copy link

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

  • bundle install --path ./tmp-fastlane-ci-bundle

@risen
Copy link

risen commented Dec 4, 2020

@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.

@ghost ghost closed this as completed Oct 4, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants