OpenShift: rhc setup gives error cannot load such file — dl/import (LoadError) on Windows

If you encountered an error below when installing the Openshift rhc commandline tool:
[sourcecode language=”bash”]
$ rhc setup
C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require’: cannot load such file — dl/import (LoadError)
 from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require’
 from C:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/pageant.rb:1:in `<top (required)>’
 from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require’
 from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require’
 from C:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent/socket.rb:5:in `<top (required)>’
 from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require’
 from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require’
 from C:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/agent.rb:22:in `<top (required)>’
 from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require’
 from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require’
 from C:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/key_manager.rb:4:in `<top (required)>’
[/sourcecode]
I’m currently running with the following versions:
*Ruby 2.2.3p173 (2015–08–18 revision 51636) [i386-mingw32]
*Rails 4.2.0

Solution:
To resolved the problem we need to install net-ssh library:
[sourcecode language=”bash”]
$ gem install net-ssh -v 2.9.3.beta1
# Next, we need to edit the rhc gemspec file, mine is located at C:\Ruby22\lib\ruby\gems\2.2.0\specifications\rhc-1.38.4.gemspec
Then, change this line of code from
s.add_runtime_dependency(%q<net-ssh>, [“<= 2.9.2”]) 
into s.add_runtime_dependency(%q<net-ssh>, [“>= 2.9.2”])
More info at http://stackoverflow.com/questions/29593646/error-setting-up-rhc-red-hat-client-tools
..
[/sourcecode]

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.