You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have updated existing project to Ruby 3.0.2 and Rails 6.1.4.1.
After updating, when try to deploy the code, system raise the error of wrong number of argument and failed to deploy.
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/rvm'
require 'slackistrano/capistrano'
require 'whenever/capistrano'
set :rvm_type, :system
set :rvm_ruby_version, '3.0.2'
#set :rvm_ruby_version, '2.3.1' #old version
Please provide any view to track the issue or how to track it and solve it.
Error log:
#<Thread:0x0000000001f16520 /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
/home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as serveruser@xx.xx.x.xx: wrong number of arguments (given 2, expected 0..1) (SSHKit::runner::ExecuteError)
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/i18n-1.8.10/lib/i18n.rb:196:in `translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/lib/capistrano/dsl.rb:20:in `t'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/lib/capistrano/tasks/git.rake:37:in `block (3 levels) in <top (required)>'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:31:in `run'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::runner::ExecuteError: Exception while executing as serveruser@xx.xx.x.xx: wrong number of arguments (given 2, expected 0..1)
Caused by:
ArgumentError: wrong number of arguments (given 2, expected 0..1)
Tasks: TOP => git:create_release => git:update => git:clone
(See full trace by running task with --trace)
bundler: failed to load command: cap (/home/test/.rbenv/versions/3.0.2/bin/cap)
/home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/i18n-1.8.10/lib/i18n.rb:196:in `translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/lib/capistrano/dsl.rb:20:in `t'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/lib/capistrano/dsl/task_enhancements.rb:56:in `exit_deploy_because_of_exception'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/lib/capistrano/application.rb:78:in `exit_because_of_exception'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:196:in `rescue in standard_exception_handling'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:185:in `standard_exception_handling'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/lib/capistrano/application.rb:15:in `run'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/bin/cap:3:in `<top (required)>'
from /home/test/.rbenv/versions/3.0.2/bin/cap:23:in `load'
from /home/test/.rbenv/versions/3.0.2/bin/cap:23:in `<top (required)>'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/cli.rb:474:in `exec'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.22/libexec/bundle:49:in `block in <top (required)>'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/3.0.0/bundler/friendly_errors.rb:128:in `with_friendly_errors'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bundler-2.2.22/libexec/bundle:37:in `<top (required)>'
from /home/test/.rbenv/versions/3.0.2/bin/bundle:23:in `load'
from /home/test/.rbenv/versions/3.0.2/bin/bundle:23:in `<main>'
/home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as serveruser@xx.xx.x.xx: wrong number of arguments (given 2, expected 0..1) (SSHKit::runner::ExecuteError)
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/i18n-1.8.10/lib/i18n.rb:196:in `translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/lib/capistrano/dsl.rb:20:in `t'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/capistrano-3.4.1/lib/capistrano/tasks/git.rake:37:in `block (3 levels) in <top (required)>'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/backends/abstract.rb:31:in `run'
from /home/test/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
The text was updated successfully, but these errors were encountered:
mohitmchavda
changed the title
Upgrading Ruby version 3.0.2 getting wrong number of arguments (given 2, expected 0..1) (SSHKit::runner::ExecuteError)
Upgrading Ruby version 3.0.2 getting wrong number of arguments (given 2, expected 0..1) (SSHKit:: runner ::ExecuteError)
Oct 18, 2021
We have updated existing project to Ruby 3.0.2 and Rails 6.1.4.1.
After updating, when try to deploy the code, system raise the error of wrong number of argument and failed to deploy.
Following is existing configuration:
Used gem file:
Cap file:
Please provide any view to track the issue or how to track it and solve it.
Error log:
The text was updated successfully, but these errors were encountered: