WinRb / WinRM

Ruby library for Windows Remote Management
Apache License 2.0
412 stars 117 forks source link

Fails to install with Ruby 3.0.0 #322

Closed dhs-rec closed 3 years ago

dhs-rec commented 3 years ago

While trying to update one of my Ruby projects to 3.0.0, I got the following error when trying to install winrm into an RVM gemset:

% rvm use 3.0.0
Using /usr/local/rvm/gems/ruby-3.0.0
% rvm gemset use WinRMTest --create
Using ruby-3.0.0 with gemset WinRMTest
ruby-3.0.0 - #gemset created /usr/local/rvm/gems/ruby-3.0.0@WinRMTest
ruby-3.0.0 - #generating WinRMTest wrappers - please wait
% gem install -N winrm
ERROR:  While executing gem ... (NoMethodError)
    undefined method `satisfied_by?' for nil:NilClass

It's working fine with other Ruby versions up to 2.7.x. I also have no problems installing other gems into this Ruby 3.0.0 gemset. OS is Ubuntu 20.04 (in case that is of any importance).

mwrock commented 3 years ago

this should be fixed with #323

dhs-rec commented 3 years ago

Hmm, still getting the same result (again, in a newly created RVM gemset):

% gem install -N winrm -v 2.3.6
ERROR:  While executing gem ... (NoMethodError)
    undefined method `satisfied_by?' for nil:NilClass

BTW: This also happens with winrm-fs and winrm-elevated.

mwrock commented 3 years ago

hmm. i just installed a clean rvm ruby 3.0.0 environment and was able to load the gem:

$ ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
$ gem install -N winrm -v 2.3.6
Fetching nori-2.6.0.gem
Fetching multi_json-1.15.0.gem
Fetching little-plugger-1.1.4.gem
Fetching logging-2.3.0.gem
Fetching rubyntlm-0.6.3.gem
Fetching httpclient-2.8.3.gem
Fetching builder-3.2.4.gem
Fetching gyoku-1.3.1.gem
Fetching winrm-2.3.6.gem
Fetching ffi-1.14.2.gem
Fetching gssapi-1.3.1.gem
Fetching erubi-1.10.0.gem
Successfully installed rubyntlm-0.6.3
Successfully installed nori-2.6.0
Successfully installed multi_json-1.15.0
Successfully installed little-plugger-1.1.4
Successfully installed logging-2.3.0
Successfully installed httpclient-2.8.3
Successfully installed builder-3.2.4
Successfully installed gyoku-1.3.1
Building native extensions. This could take a while...
Successfully installed ffi-1.14.2
Successfully installed gssapi-1.3.1
Successfully installed erubi-1.10.0
Successfully installed winrm-2.3.6
12 gems installed
dhs-rec commented 3 years ago

Checked again and the problem seems to be related to our internal Gem cache (Nexus 3). Works fine if I use rubygems.org directly.