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

sudo: bundle: command not found, Compatible with RVM? #59

Open
climatecheck opened this issue Jul 15, 2013 · 2 comments
Open

sudo: bundle: command not found, Compatible with RVM? #59

climatecheck opened this issue Jul 15, 2013 · 2 comments

Comments

@climatecheck
Copy link

I'm trying to get RVM, capistrano and unicorn to place nice together with a multistage setup. I'm currently getting this:

joshua@ccubuntu:~/collaborase/current$ cap unicorn:start
triggering load callbacks
* 2013-07-15 19:56:06 executing `staging'
triggering start callbacks for `unicorn:start'
* 2013-07-15 19:56:07 executing `multistage:ensure'
* 2013-07-15 19:56:07 executing `unicorn:start'
  triggering before callbacks for `unicorn:start'
* executing "if [ -e /home/staging/capistrano/current/config/unicorn.rb ]; then\\\n              UNICORN_CONFIG_PATH=/home/staging/capistrano/current/config/unicorn.rb;\\\n            else\\\n              if [ -e /home/staging/capistrano/current/config/unicorn/staging.rb ]; then\\\n                UNICORN_CONFIG_PATH=/home/staging/capistrano/current/config/unicorn/staging.rb;\\\n              else\\\n                echo \"Config file for \"staging\" environment was not found at either \"/home/staging/capistrano/current/config/unicorn.rb\" or \"/home/staging/capistrano/current/config/unicorn/staging.rb\"\";\\\n                exit 1;\\\n              fi;\\\n            fi;\\\n\\\n            if [ -e /home/staging/capistrano/current/tmp/pids/unicorn.pid ]; then\\\n              if sudo -p 'sudo password: ' -u staging kill -0 `cat /home/staging/capistrano/current/tmp/pids/unicorn.pid` > /dev/null 2>&1; then\\\n                echo \"Unicorn is already running!\";\\\n                exit 0;\\\n              fi;\\\n\\\n              sudo -p 'sudo password: ' -u staging rm /home/staging/capistrano/current/tmp/pids/unicorn.pid;\\\n            fi;\\\n\\\n            echo \"Starting Unicorn...\";\\\n            cd /home/staging/capistrano/current && sudo -p 'sudo password: ' -u staging BUNDLE_GEMFILE=/home/staging/capistrano/current/Gemfile bundle exec unicorn -c $UNICORN_CONFIG_PATH -E staging -D;"
servers: ["ccdev.dyndns.org"]
Password:
[ccdev.dyndns.org] executing command
 ** [out :: ccdev.dyndns.org] Starting Unicorn...
 ** [out :: ccdev.dyndns.org] sudo: bundle: command not found
    command finished in 785ms
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'default' -c 'if [ -e /home/staging/capistrano/current/config/unicorn.rb ]; then\\\n              UNICORN_CONFIG_PATH=/home/staging/capistrano/current/config/unicorn.rb;\\\n            else\\\n              if [ -e /home/staging/capistrano/current/config/unicorn/staging.rb ]; then\\\n                UNICORN_CONFIG_PATH=/home/staging/capistrano/current/config/unicorn/staging.rb;\\\n              else\\\n                echo \"Config file for \"staging\" environment was not found at either \"/home/staging/capistrano/current/config/unicorn.rb\" or \"/home/staging/capistrano/current/config/unicorn/staging.rb\"\";\\\n                exit 1;\\\n              fi;\\\n            fi;\\\n\\\n            if [ -e /home/staging/capistrano/current/tmp/pids/unicorn.pid ]; then\\\n              if sudo -p '\\''sudo password: '\\'' -u staging kill -0 `cat /home/staging/capistrano/current/tmp/pids/unicorn.pid` > /dev/null 2>&1; then\\\n                echo \"Unicorn is already running!\";\\\n                exit 0;\\\n              fi;\\\n\\\n              sudo -p '\\''sudo password: '\\'' -u staging rm /home/staging/capistrano/current/tmp/pids/unicorn.pid;\\\n            fi;\\\n\\\n            echo \"Starting Unicorn...\";\\\n            cd /home/staging/capistrano/current && sudo -p '\\''sudo password: '\\'' -u staging BUNDLE_GEMFILE=/home/staging/capistrano/current/Gemfile bundle exec unicorn -c $UNICORN_CONFIG_PATH -E staging -D;'" on ccdev.dyndns.org

I'm trying not to use sudo or rvmsudo. I've set unicorn_user = 'staging' in unicorn.rb. That's the same user as :user in deploy.rb but I was getting a can't find user for apps error till I inserted that.

Ideas?

@michelson
Copy link

I get the same errors, I´ve downgraded to 0.7.1 and it works

@sfsekaran
Copy link
Contributor

If you would write a failing spec for this, and maybe a fix too, that would be awesome. I know RVM issues can be tough, so any help is very much appreciated!

Sathya Sekaran
Sent from Mailbox for iPhone

On Tue, Sep 10, 2013 at 7:24 PM, Miguel Michelson Martinez
[email protected] wrote:

I get the same errors, I´ve downgraded to 0.7.1 and it works

Reply to this email directly or view it on GitHub:
#59 (comment)

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