Bug 1288667 - Ruby 2.2.3 does not appear to work with rhc on windows
Ruby 2.2.3 does not appear to work with rhc on windows
Status: CLOSED WONTFIX
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Timothy Williams
Wei Sun
:
: 1265282 (view as bug list)
Depends On: 1289140
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-04 17:46 EST by Eric Jones
Modified: 2017-05-31 14:22 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-31 14:22:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Jones 2015-12-04 17:46:53 EST
Description of problem:
rhc setup fails after following cli setup for Windows (tested on windows 10) if 32 bit or 64 bit version of ruby is installed.

Version-Release number of selected component (if applicable):
ruby 2.2.3
git version 2.6.3.windows.1

How reproducible:
100%

Steps to Reproduce:
1. Download and install ruby 2.2.3
2. Download and install git for windows 2.6.3
3. Run `gem install rhc`
4. Run `rhc setup`

Actual results:
setup fails. error below repeats over and over:
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)>'

Expected results:
Success in setting up rhc

Additional info:
I have tested in quickvm Windows 10 environment. Uninstalling ruby 2.2.3 and installing ruby 2.1.7 and rerunning `gem install rhc` works and allows `rhc setup` to succeed.
Comment 7 Timothy Williams 2016-01-05 10:44:47 EST
*** Bug 1265282 has been marked as a duplicate of this bug. ***
Comment 8 Bernie Hoefer 2016-01-25 09:34:55 EST
Just checking on the status of this BZ.  Thanks!
Comment 9 Timothy Williams 2016-01-25 11:51:20 EST
Hi Bernie,

We have an open pull request for this here: https://github.com/openshift/rhc/pull/739

We have been doing some testing on the backend and are trying to work through some confusion around the gemspec and gemfile. Sorry for the delay.
Comment 10 Rory Thrasher 2016-04-22 18:22:30 EDT
Bernie,

Sorry for the long wait.  Its been very interesting trying to figure out these dependency issues for RHC.  It seems to be impossible to provide a pre-built rhc gem (like the one found at rubygems.org) that will support Ruby 1.8.7 for our RHEL customers and also support the newer versions of Ruby.

So instead of downloading the gem from rubygems.org like before, customers wanting to use newer versions of RHC should instead build it from source.  We've added conditional code that checks the Ruby version at build time and will install the correct dependencies, see <https://github.com/openshift/rhc/pull/750>.  This has just been changed, so documentation has yet to be updated, but the basic instructions are as follows.


1. Install the desired ruby version from <http://rubyinstaller.org/> and git for windows from <https://git-for-windows.github.io/>.

2. In the command prompt, navigate to where you would like to install the rhc source and `git clone https://github.com/openshift/rhc`, then cd into the newly downloaded rhc directory.

3. Build the gem from source with `gem build rhc.gemspec`.  This will build the gem using the current version of ruby to determine dependencies, and will create a file named rhc-1.38.4.gem.  There will likely be a few warnings when building, but it should say "Successfully built RubyGem" near the end of the output.

4. Install the local gem with `gem install rhc-1.38.4.gem`.  This will download all the dependencies and set up RHC.  You may be required to add RHC to your path, but I didn't have to in my testing.

5. Run `rhc setup` and then continue to rhc as before.
Comment 11 Bernie Hoefer 2016-04-22 18:50:27 EDT
(In reply to Rory Thrasher from comment #10)
===
> Sorry for the long wait.
===

Not a problem!  Thank you for continuing to work on this!

===
> We've added conditional code that checks the Ruby version at build time and
> will install the correct dependencies, see
> <https://github.com/openshift/rhc/pull/750>.  This has just been changed, so
> documentation has yet to be updated, but the basic instructions are as
> follows.
===

Thank you again for this.  When the documentation is updated, I'll update the KCS document to reference it.  Thanks!
Comment 12 Rory Thrasher 2016-05-13 16:14:51 EDT
QA,

Can we verify that rhc will setup and run properly when built on a windows system with Ruby 2.2.x?

1. Download and install ruby 2.2.x (2.2.3 or 2.2.4) 

2. Download and install git for windows

3. Use the instructions from Comment #10 to build rhc locally:

3a. In the command prompt, navigate to where you would like to install the rhc source and `git clone https://github.com/openshift/rhc`, then cd into the newly downloaded rhc directory.

3b. Build the gem from source with `gem build rhc.gemspec`.  This will build the gem using the current version of ruby to determine dependencies, and will create a file named rhc-1.38.4.gem.

3c. Install the local gem with `gem install rhc-1.38.4.gem`.  This will download all the dependencies and set up RHC.  You may be required to add RHC to your path.

4. Run `rhc setup` successfully

Thank you!
Comment 13 weiwei jiang 2016-05-16 06:43:23 EDT
(In reply to Rory Thrasher from comment #12)
> QA,
> 
> Can we verify that rhc will setup and run properly when built on a windows
> system with Ruby 2.2.x?
> 
> 1. Download and install ruby 2.2.x (2.2.3 or 2.2.4) 
> 
> 2. Download and install git for windows
> 
> 3. Use the instructions from Comment #10 to build rhc locally:
> 
> 3a. In the command prompt, navigate to where you would like to install the
> rhc source and `git clone https://github.com/openshift/rhc`, then cd into
> the newly downloaded rhc directory.
> 
> 3b. Build the gem from source with `gem build rhc.gemspec`.  This will build
> the gem using the current version of ruby to determine dependencies, and
> will create a file named rhc-1.38.4.gem.
> 
> 3c. Install the local gem with `gem install rhc-1.38.4.gem`.  This will
> download all the dependencies and set up RHC.  You may be required to add
> RHC to your path.
> 
> 4. Run `rhc setup` successfully
> 
> Thank you!

Checked with the step, and still can not setup successfully, and some error as before.
Comment 14 Rory Thrasher 2016-05-16 15:57:14 EDT
Can you elaborate a bit more on the test methods and the results?  I was able to take a windows machine with a broken version of rhc, clone the rhc repo, gem build and gem install.  I was then able to use rhc successfully after that.

Can you check the path by using `where rhc` to make sure you're using the new gem built from the clone instead of the old install from rubygems.org?

For gem dependencies, there should no longer be a net-ssh dependency listed if using a newer version of ruby.

>gem dependency rhc
Gem rhc-1.38.4
  activesupport (~> 3.0, development)
  archive-tar-minitar (>= 0)
  commander (< 4.3.0, >= 4.0)
  cucumber (<= 1.3.20, development)
  fakefs (< 0.6.0, >= 0.4, development)
  highline (~> 1.6.11)
  httpclient (< 2.7.0, >= 2.4.0)
  net-scp (>= 1.1.2)
  net-ssh-multi (>= 1.2.0)
  open4 (>= 0)
  rake (>= 0.8.7, development)
  rspec (< 2.99, >= 2.8.0, development)
  thor (>= 0, development)
  webmock (< 1.12, development)
Comment 15 Rory Thrasher 2016-06-03 13:34:05 EDT
QA,

Can we retest using the previous instructions (comment 12) to verify or get more information on why/how this is failing?

Thank you.
Comment 16 weiwei jiang 2016-06-23 02:51:02 EDT
(In reply to Rory Thrasher from comment #15)
> QA,
> 
> Can we retest using the previous instructions (comment 12) to verify or get
> more information on why/how this is failing?
> 
> Thank you.

Rechecked and work now, seems I have a broken net-ssh-2.9.2 package(gem list not display, but still have some file on the filesystem)
Comment 17 Eric Paris 2017-05-31 14:22:11 EDT
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.

Note You need to log in before you can comment on or make changes to this bug.