capistrano / rbenv

Idiomatic rbenv support for Capistrano 3.x
MIT License
203 stars 60 forks source link

Bundler executable not available #77

Open benwalsh opened 6 years ago

benwalsh commented 6 years ago

I'm having a problem with running bundler. The deploy completes deploy:symlink:linked_dirs and then fails on bundler:install:

 01 RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.4.2 $HOME/.rbenv/bin/rbenv exec bundle install --path /home/ubuntu/rails/<APPLICATION>/current/bin/bundle --without development test --deployment --quiet --binstubs
 01 rbenv: bundle: command not found

I've tried installing it manually with rbenv exec gem install bundler and rbenv rehash, but the executable bundle does not appear.

capistrano 3.10.0 capistrano-rbenv 2.1.3 capistrano-bundler 1.3.0 capistrano-rails 1.3.0 rails 4.2.10 rbenv 1.1.1

will-in-wi commented 6 years ago

If you run RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.4.2 $HOME/.rbenv/bin/rbenv exec gem list | grep bundler, what's the output?

benwalsh commented 6 years ago

The gem is there, but not the executable.

will-in-wi commented 6 years ago

Shot in the dark, but does it work if you run RBENV_ROOT=$HOME/.rbenv RBENV_VERSION=2.4.2 $HOME/.rbenv/bin/rbenv rehash ?

maynardewm commented 6 years ago

I'ma also having this issue. Bundler is there.

will-in-wi commented 6 years ago

@maynardewm: Same exact output? Could you paste the error message?

maynardewm commented 6 years ago

It's slightly different:

INFO [02658949] Running bundle exec puma -C /home/ubuntu/app_name/shared/puma.rb --daemon as ubuntu@54.68.177.131

 DEBUG [02658949] Command: cd /home/ubuntu/app_name/current && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.5.0" RACK_ENV="staging" ; bundle exec puma -C /home/ubuntu/app_name/shared/puma.rb --daemon )

 DEBUG [02658949]   bash: bundle: command not found

Everything works up until this command. Which is weird because that means it's running bundle install....?

will-in-wi commented 6 years ago

I think you have a different issue, and should probably open your own ticket.

Offhand, I'd guess that you are running something like execute 'puma -C .....' instead of execute :puma, '-C ......'. If that's the case, try the latter syntax. If that is not the case, open a new ticket, or better yet, open a Stack Overflow question, since this is more of a support issue than a bug.

ngetahun commented 5 years ago

I had the same problem. What worked for me was adding puma and pumactl to rbenv_map_bins. Hope this helps.

LuisHCK commented 4 years ago

I had the same problem. What worked for me was adding puma and pumactl to rbenv_map_bins. Hope this helps.

@ngetahun it worked perfectly for my case too. Thank you very much <3