{"action":"closed","issue":{"url":"https://api.github.com/repos/seuros/capistrano-puma/issues/138","repository_url":"https://api.github.com/repos/seuros/capistrano-puma","labels_url":"https://api.github.com/repos/seuros/capistrano-puma/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/seuros/capistrano-puma/issues/138/comments","events_url":"https://api.github.com/repos/seuros/capistrano-puma/issues/138/events","html_url":"https://github.com/seuros/capistrano-puma/issues/138","id":115560710,"number":138,"title":"rbenv_prefix overwritten by commit that introduced `set :bundle_bins,`","user":{"login":"pjammer","id":24576,"avatar_url":"https://avatars.githubusercontent.com/u/24576?v=3","gravatar_id":"","url":"https://api.github.com/users/pjammer","html_url":"https://github.com/pjammer","followers_url":"https://api.github.com/users/pjammer/followers","following_url":"https://api.github.com/users/pjammer/following{/other_user}","gists_url":"https://api.github.com/users/pjammer/gists{/gist_id}","starred_url":"https://api.github.com/users/pjammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjammer/subscriptions","organizations_url":"https://api.github.com/users/pjammer/orgs","repos_url":"https://api.github.com/users/pjammer/repos","events_url":"https://api.github.com/users/pjammer/events{/privacy}","received_events_url":"https://api.github.com/users/pjammer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-06T18:26:56Z","updated_at":"2016-04-30T21:27:05Z","closed_at":"2016-04-30T21:27:05Z","body":"`set :bundle_bins, fetch(:bundle_bins).to_a.concat(%w{ puma pumactl })` and resulting changes to the `puma.rake` file in the commit https://github.com/seuros/capistrano-puma/commit/2a0c2dc3b2dc7e75ccc8640b4595e5afb4f3a10d appear to have broken any puma restart (in my case).\r\n\r\ni cowboy coded locally by commenting out the changes in this commit back to using `execute :bundle, 'exec', :pumactl, \"-S #{fetch(:puma_state)} -F #{fetch(:puma_conf)} #{command}\"` for instance.\r\n\r\nI'm not proficient enough in capistrano to understand where execute gets it's call for bundle from, but in a code base i inherited they used a `rbenv_prefix` and that basically hardcodes the rbenv variables and paths it needs to run a 'normal' `bundle exec`\r\n\r\nhere is a sample: `set :rbenv_prefix, \"RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec\"`\r\n\r\nwithout this, and using the existing gem that way it is, you get an error similar to #131 had.\r\n\r\n```bash \r\nDEBUG [b57776c7] \tbash: bundle: command not found\r\n(Backtrace restricted to imported tasks)\r\ncap aborted!\r\nSSHKit::Runner::ExecuteError: Exception while executing as deploy@blah.com: pumactl exit status: 127\r\npumactl stdout: Nothing written\r\npumactl stderr: bash: bundle: command not found\r\n\r\nSSHKit::Command::Failed: pumactl exit status: 127\r\npumactl stdout: Nothing written\r\npumactl stderr: bash: bundle: command not found\r\n\r\nTasks: TOP => puma:phased-restart\r\n(See full trace by running task with --trace)\r\nThe deploy has failed with an error: Exception while executing as deploy@blah.com: pumactl exit status: 127\r\npumactl stdout: Nothing written\r\npumactl stderr: bash: bundle: command not found\r\n\r\n```\r\n\r\nIdeally I'd make the new change work with this prefix, but how execute gets inherited is beyond me right now. Just thought I'd leave this here for now and see if it's something we did wrong, or if we need to add the `rbenv_prefix` somehow to the `puma.rake` file. dunno. spitballing."}}