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

bash: /bin/rvm: No such file or directory #10

Closed
kyledecot opened this issue Nov 20, 2013 · 16 comments
Closed

bash: /bin/rvm: No such file or directory #10

kyledecot opened this issue Nov 20, 2013 · 16 comments

Comments

@kyledecot
Copy link
Contributor

When running cap production rvm:check I get no errors and the output

DEBUG [138bf764] Running /var/www/skateboxes/.rvm/bin/rvm current on 162.243.33.179
DEBUG [138bf764] Command: ( RVM_BIN_PATH=~/.rvm/bin RAILS_ENV=production /var/www/skateboxes/.rvm/bin/rvm current )
DEBUG [138bf764]    ruby-2.0.0-p247
DEBUG [138bf764] Finished in 1.174 seconds with exit status 0 (successful).
DEBUG [a99164dc] Running /var/www/skateboxes/.rvm/bin/rvm version on 162.243.33.179
DEBUG [a99164dc] Command: ( RVM_BIN_PATH=~/.rvm/bin RAILS_ENV=production /var/www/skateboxes/.rvm/bin/rvm version )
DEBUG [a99164dc]
DEBUG [a99164dc]    rvm 1.24.1 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
DEBUG [a99164dc]
DEBUG [a99164dc] Finished in 0.843 seconds with exit status 0 (successful).
rvm 1.24.1 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
DEBUG [e0f89017] Running /var/www/skateboxes/.rvm/bin/rvm current on 162.243.33.179
DEBUG [e0f89017] Command: ( RVM_BIN_PATH=~/.rvm/bin RAILS_ENV=production /var/www/skateboxes/.rvm/bin/rvm current )
DEBUG [e0f89017]    ruby-2.0.0-p247
DEBUG [e0f89017] Finished in 0.357 seconds with exit status 0 (successful).
ruby-2.0.0-p247
DEBUG [dc326b3f] Running /var/www/skateboxes/.rvm/bin/rvm ruby-2.0.0-p247 do ruby --version on 162.243.33.179
DEBUG [dc326b3f] Command: ( RVM_BIN_PATH=~/.rvm/bin RAILS_ENV=production /var/www/skateboxes/.rvm/bin/rvm ruby-2.0.0-p247 do ruby --version )
DEBUG [dc326b3f]    ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
DEBUG [dc326b3f] Finished in 0.866 seconds with exit status 0 (successful).
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]

When running cap production puma:status (or any other puma task for that matter) I get

DEBUG [903e5133] Running if test ! -d /var/www/skateboxes/current; then echo "Directory does not exist '/var/www/skateboxes/current'" 1>&2; false; fi on 162.243.33.179
DEBUG [903e5133] Command: if test ! -d /var/www/skateboxes/current; then echo "Directory does not exist '/var/www/skateboxes/current'" 1>&2; false; fi
DEBUG [903e5133] Finished in 0.520 seconds with exit status 0 (successful).
 INFO [c85a5496] Running /bin/rvm  do pumactl -S /var/www/skateboxes/shared/tmp/pids/puma.state status on 162.243.33.179
DEBUG [c85a5496] Command: cd /var/www/skateboxes/current && ( RVM_BIN_PATH=~/.rvm/bin RAILS_ENV=production /bin/rvm  do pumactl -S /var/www/skateboxes/shared/tmp/pids/puma.state status )
DEBUG [c85a5496]    bash: /bin/rvm: No such file or directory

The interesting part here is that in the rvm:check command it knew to run .../var/www/skateboxes/.rvm/bin/rvm ruby-2.0.0-p247 do... whereas puma:status simply tried to run .../bin/rvm...;

@seuros
Copy link
Owner

seuros commented Nov 20, 2013

You have to set :pumactl_cmd and :puma_cmd if you using RVM.
Else can run rvm:hook before that task.

@kyledecot
Copy link
Contributor Author

I previously tried this but this gives me

DEBUG [54af7937] Running if test ! -d /var/www/skateboxes/current; then echo "Directory does not exist '/var/www/skateboxes/current'" 1>&2; false; fi on 162.243.33.179
DEBUG [54af7937] Command: if test ! -d /var/www/skateboxes/current; then echo "Directory does not exist '/var/www/skateboxes/current'" 1>&2; false; fi
DEBUG [54af7937] Finished in 0.701 seconds with exit status 0 (successful).
 INFO [a71ff5e1] Running bundle exec pumactl -S /var/www/skateboxes/shared/tmp/pids/puma.state status on 162.243.33.179
DEBUG [a71ff5e1] Command: bundle exec pumactl -S /var/www/skateboxes/shared/tmp/pids/puma.state status
DEBUG [a71ff5e1]    bash: bundle: command not found

@kyledecot
Copy link
Contributor Author

Trying before 'puma:status', 'rvm:hook' gives me

/var/www/skateboxes/.rvm/scripts/set: line 15: exec: pumactl: not found

@seuros
Copy link
Owner

seuros commented Nov 20, 2013

I think your RVM installation is wrong probably. @syntaxTerr0r is using rvm too and apparently everything work as expected.

@kyledecot
Copy link
Contributor Author

I completely removed RVM and then reinstalled it per RMV's instructions which logged in as the deploy user. I have no clue how to debug his. Any ideas? We could always use something like http://screenhero.com/ so you can see my setup for yourself

@seuros
Copy link
Owner

seuros commented Nov 20, 2013

ok in 4 h from now. i will be in freenode in the ror channel.

@kyledecot
Copy link
Contributor Author

Awesome! I really appreciate all your time and help

@molfar
Copy link
Contributor

molfar commented Nov 20, 2013

@kyledecot I'd like to see your project too. I think there no need for any rvm's hooks.

@syntaxTerr0r
Copy link

I get the same issue with my system-wide RVM install.
The variable :rvm_custom_path provided by the capistrano-rvm gem didn't worked for me, so I cheated by redefining set :rvm_path, '/usr/local/rvm'in my config/deploy/STAGE.rb. Anyway if you get a better solution, I take it :)

@kyledecot
Copy link
Contributor Author

Okay, now I'm confused. There is rvm_custom_path, AND rvm_path? Where does rvm_path come from?

@seuros
Copy link
Owner

seuros commented Nov 20, 2013

@syntaxTerr0r
Copy link

@kyledecot yeah, i'm confused too :/ Anyway this question deserve to be asked on capistrano-rvm bug tracker...

@kyledecot
Copy link
Contributor Author

capistrano/rvm#23

@syntaxTerr0r
Copy link

GJ!

@seuros
Copy link
Owner

seuros commented Nov 28, 2013

@kyledecot The last version should fix this issue.

@kyledecot
Copy link
Contributor Author

Fixed. Thanks!

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

4 participants