capistrano / passenger

Passenger support for Capistrano 3.x
MIT License
138 stars 44 forks source link

Deployment fails with ruby version 2.4.x #47

Closed nimashariatian closed 5 years ago

nimashariatian commented 5 years ago

Full trace:

bundle exec cap production deploy:check --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke rvm:hook (first_time)
** Invoke passenger:rvm:hook (first_time)
** Invoke passenger:test_which_passenger (first_time)
** Execute passenger:test_which_passenger
cap aborted!
NoMethodError: undefined method `>=' for nil:NilClass
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/formatters/pretty.rb:53:in `write_message'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/formatters/pretty.rb:21:in `log_command_start'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/backends/netssh.rb:84:in `execute_command'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:137:in `block in create_command_and_execute'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:137:in `tap'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:137:in `create_command_and_execute'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:50:in `test'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/capistrano-passenger-0.2.0/lib/capistrano/tasks/passenger.cap:42:in `block (3 levels) in <top (required)>'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/backends/abstract.rb:29:in `run'
/Users/home/.rbenv/versions/2.4.5/lib/ruby/gems/2.4.0/gems/sshkit-1.9.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => rvm:hook => passenger:rvm:hook => passenger:test_which_passenger

switching to ruby 2.3.x works for some reason

betesh commented 5 years ago

Interesting...Can you reproduce this in sshkit without capistrano-passenger?

nimashariatian commented 5 years ago

FYI, Upgrading capistrano solved this issue Thanks!