Open dorianmariecom opened 2 months ago
AFAIK, SSHKit::StandardError
is only defined by sshkit once, at lib/sshkit.rb:3: https://github.com/capistrano/sshkit/blob/c3815c2229e782091caa8dd511969fae4dcbf7c3/lib/sshkit.rb#L3
The only thing I can think of that would cause this error is if there is a monkey patch in another gem that is defining the SSHKit::StandardError
constant before require "sshkit"
is being called. Is that possible in your setup?
As a workaround/experiment, you could try adding gem "sshkit"
to your Gemfile before any other gem to see if that changes the behavior at all.
The other thing you could try is to edit your locally installed sshkit gem (e.g. using bundle open sshkit
) and add this line just before sshkit defines the SSHKit::StandardError
constant in lib/sshkit.rb
:
module SSHKit
pp SSHKit.const_source_location(:StandardError) # ADD THIS LINE
StandardError = Class.new(::StandardError)
That may provide a clue as to where the duplicate constant is being defined.
it seems there is a constant being initialized twice