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

Command /usr/bin/env [ ! -d ~/.rbenv/versions/2.1.3 ] fails on production. #4

Closed
marvindanig opened this issue Nov 5, 2014 · 1 comment

Comments

@marvindanig
Copy link

This is my fourth attempt to make it work with Capistrano 3. The experience so far with the new Capistrano has been terrible so I'm not taking any chances. Not proceeding to the next step until this first step of safe_deploy_to works out flawlessly:

$ cap production safe_deploy_to:ensure
G[33f74157] Running /usr/bin/env [ ! -d /.rbenv/versions/2.1.3 ] on IP
DEBUG[33f74157] Command: [ ! -d /.rbenv/versions/2.1.3 ]
DEBUG[33f74157] Finished in 0.782 seconds with exit status 1 (failed).
INFO[2a62b37a] Running /usr/bin/env sudo mkdir -pv /var/www/MyAPP on IP
DEBUG[2a62b37a] Command: ( RBENV_ROOT=
/.rbenv RBENV_VERSION=2.1.3 /usr/bin/env sudo mkdir -pv /var/www/MyAPP )
INFO[2a62b37a] Finished in 0.116 seconds with exit status 0 (successful).
DEBUG[6b62784c] Running /usr/bin/env id -un on IP
DEBUG[6b62784c] Command: ( RBENV_ROOT=
/.rbenv RBENV_VERSION=2.1.3 /usr/bin/env id -un )
DEBUG[6b62784c] deployer
DEBUG[6b62784c] Finished in 0.112 seconds with exit status 0 (successful).
DEBUG[f467054c] Running /usr/bin/env id -gn on IP
DEBUG[f467054c] Command: ( RBENV_ROOT=/.rbenv RBENV_VERSION=2.1.3 /usr/bin/env id -gn )
DEBUG[f467054c] deployers
DEBUG[f467054c] Finished in 0.106 seconds with exit status 0 (successful).
INFO[7975f592] Running /usr/bin/env sudo chown deployer:deployers /var/www/MyAPP on IP
DEBUG[7975f592] Command: ( RBENV_ROOT=
/.rbenv RBENV_VERSION=2.1.3 /usr/bin/env sudo chown deployer:deployers /var/www/MyAPP )
INFO[7975f592] Finished in 0.112 seconds with exit status 0 (successful).

Why does this line say 'failed'?:

DEBUG[33f74157] Command: [ ! -d ~/.rbenv/versions/2.1.3 ]
DEBUG[33f74157] Finished in 0.782 seconds with exit status 1 (failed).

  • M
@bruno-
Copy link
Member

bruno- commented Nov 6, 2014

Sorry to hear the pain.. but yes, this stuff is hard.

This:

DEBUG[33f74157] Command: [ ! -d ~/.rbenv/versions/2.1.3 ]

is a check from capistrano-rbenv plugin (you can even see it's doing something related to rbenv). Here is the relevant task in capistrano-rbenv plugin.

I think the red failed output is generated by that test command. It's overly verbose and scares users.

Now, from what I see in your output everything went out okay because safe_deploy_to:ensure task executed well.
If it comforts you, I just ran the same task on my prod server and I can also see red "failed" output.

As a rule of thumb, if the whole capistrano command executed well, everything is well and don't worry about the intermediate output.
Also, you'll see a lot of scary red output with other plugins as well (for regular use cases). Example capistrano-unicorn-nginx has it.

Closing the issue because everything seems to be ok, but let me know if you have other questions.

@bruno- bruno- closed this as completed Nov 6, 2014
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

2 participants