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

Check that current_path exists before stopping #16

Merged
merged 1 commit into from
May 12, 2014
Merged

Check that current_path exists before stopping #16

merged 1 commit into from
May 12, 2014

Conversation

alexdunae
Copy link
Contributor

Otherwise within current_path throws an error an exits.

Otherwise `within current_path` throws an error an exits.
@alexdunae
Copy link
Contributor Author

Thanks kindly for the Gem. I ran into this little glitch while deploying a new site in a bare directory.

(I just noticed issues #11 and #14 – looks like people are already on it. Should have checked first, obviously...)

@seuros
Copy link
Owner

seuros commented Apr 27, 2014

can you try with the latest version ?

@masterkain
Copy link

Hello,
I got the same issue, I'm already using master and I have the current dir does not exists error on new deploys.

https://github.com/seuros/capistrano-sidekiq/blob/master/lib/capistrano/tasks/sidekiq.cap#L29

@masterkain
Copy link

Full trace:

 INFO [fa38522d] Running ~/.rvm/bin/rvm 2.1.1 do bundle exec rake db:migrate on 162.243.xxx.xxx
 INFO [fa38522d] Finished in 11.372 seconds with exit status 0 (successful).
cap aborted!
SSHKit::Command::Failed: if test ! -d /home/ubuntu/apps/myapp-rails/current; then echo "Directory does not exist '/home/ubuntu/apps/myapp-rails/current'" 1>&2; false; fi exit status: 1
if test ! -d /home/ubuntu/apps/myapp-rails/current; then echo "Directory does not exist '/home/ubuntu/apps/myapp-rails/current'" 1>&2; false; fi stdout: Nothing written
if test ! -d /home/ubuntu/apps/myapp-rails/current; then echo "Directory does not exist '/home/ubuntu/apps/myapp-rails/current'" 1>&2; false; fi stderr: Nothing written
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/command.rb:98:in `exit_status='
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:142:in `block (4 levels) in _execute'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:551:in `do_request'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:561:in `channel_request'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:205:in `process'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:269:in `wait'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:164:in `block (2 levels) in _execute'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:514:in `call'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/channel.rb:514:in `do_open_confirmation'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:545:in `channel_open_confirmation'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:465:in `dispatch_incoming_packets'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:221:in `preprocess'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:205:in `process'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/net-ssh-2.9.0/lib/net/ssh/connection/session.rb:169:in `loop'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:166:in `block in _execute'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:123:in `tap'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:123:in `_execute'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/abstract.rb:75:in `within'
/Users/kain/.rvm/gems/ruby-2.1.1/bundler/gems/capistrano-sidekiq-048690031a18/lib/capistrano/tasks/sidekiq.cap:29:in `block in for_each_process'
/Users/kain/.rvm/gems/ruby-2.1.1/bundler/gems/capistrano-sidekiq-048690031a18/lib/capistrano/tasks/sidekiq.cap:28:in `each'
/Users/kain/.rvm/gems/ruby-2.1.1/bundler/gems/capistrano-sidekiq-048690031a18/lib/capistrano/tasks/sidekiq.cap:28:in `each_with_index'
/Users/kain/.rvm/gems/ruby-2.1.1/bundler/gems/capistrano-sidekiq-048690031a18/lib/capistrano/tasks/sidekiq.cap:28:in `for_each_process'
/Users/kain/.rvm/gems/ruby-2.1.1/bundler/gems/capistrano-sidekiq-048690031a18/lib/capistrano/tasks/sidekiq.cap:129:in `block (3 levels) in <top (required)>'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/kain/.rvm/gems/ruby-2.1.1/gems/sshkit-1.4.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => sidekiq:stop
(See full trace by running task with --trace)
The deploy has failed with an error: #<SSHKit::Command::Failed: if test ! -d /home/ubuntu/apps/myapp-rails/current; then echo "Directory does not exist '/home/ubuntu/apps/myapp-rails/current'" 1>&2; false; fi exit status: 1
if test ! -d /home/ubuntu/apps/myapp-rails/current; then echo "Directory does not exist '/home/ubuntu/apps/myapp-rails/current'" 1>&2; false; fi stdout: Nothing written
if test ! -d /home/ubuntu/apps/myapp-rails/current; then echo "Directory does not exist '/home/ubuntu/apps/myapp-rails/current'" 1>&2; false; fi stderr: Nothing written
>

@seuros
Copy link
Owner

seuros commented May 12, 2014

I'm sorry!

seuros added a commit that referenced this pull request May 12, 2014
Check that current_path exists before stopping
@seuros seuros merged commit b6f5ec9 into seuros:master May 12, 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

Successfully merging this pull request may close these issues.

3 participants