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

conflict definition of rvm_map_bins with other gem (capistrano3-puma) #68

Open
masarakki opened this issue Oct 29, 2015 · 3 comments
Open

Comments

@masarakki
Copy link

capistrano-puma3 is defines rvm_map_bins in this code:

namespace :load do
  task :defaults do
    set :rvm_map_bins, fetch(:rvm_map_bins).to_a.concat(%w{ puma pumactl })
  end
end

and rvm1-capistrano3 defines:

namespace :load do
  task :defaults do
       set :rvm1_map_bins,   -> { fetch(:rvm_map_bins, %w{rake gem bundle ruby}) }
  end
end

so, when capistrano load defaults with order of capistrano3-puma -> rvm1-capistrano3,
rvm1_map_bins will be only ['puma', 'pumactl'] and bundle install will fail.

@iurifq
Copy link

iurifq commented Nov 3, 2015

I experienced the very same issue. The bundler bundler:install task fails with /usr/bin/env: bundle: No such file or directory

For now, I'm manually setting the rvm1_map_bins

set :rvm1_map_bins,   -> { %w{rake gem bundle ruby} }

@masarakki
Copy link
Author

I don't want to set :rvm_map_bins myself, becase I must understand what bins exist in all gems.
so I think it is better that rvm1-capistrano3 define it like capistrano3-puma,

    set :rvm1_map_bins, -> { fetch(:rvm_map_bins).to_a.concat(%w{rake gem bundle ruby}) }

but, off cause, it is not a best way...
it is completely shit code.

@dgarwood
Copy link

dgarwood commented Apr 2, 2019

@masarakki list these like so in your Capfile:

require 'capistrano/rails'
require 'capistrano/bundler'
require 'rvm1/capistrano3'
...
require 'capistrano/puma'

That's the config I have and there isn't an issue with these two working together. This ensures that rvm1/capistrano3 sets the variable first and that capistrano/puma adds to it without being overwritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants