Bug 1289140

Summary: Current Latest version of ruby does not work with rhc for windows
Product: OpenShift Online Reporter: Eric Jones <erjones>
Component: DocumentationAssignee: Vikram Goyal <vigoyal>
Status: CLOSED NOTABUG QA Contact: Vikram Goyal <vigoyal>
Severity: low Docs Contact: Vikram Goyal <vigoyal>
Priority: low    
Version: 2.xCC: aos-bugs, erjones, jokerman, mmccomas, rthrashe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-25 20:02:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1288667    

Description Eric Jones 2015-12-07 14:14:00 UTC
Document URL: 
https://access.redhat.com/documentation/en-US/OpenShift_Online/2.0/html-single/Client_Tools_Installation_Guide/index.html#sect-Installing_on_Windows

Section Number and Name: 
⁠2.2.1.2.1. Installing RubyInstaller

Describe the issue: 
The documentation says to install the newest version, but according to bug 1288667, the "latest" version at the time of making this bug (2015/12/7) ruby version 2.2.3 does not work with rhc on windows; However, the image below this text indicates installing 1.9.3, which does work but is also the oldest version on the rubyinstaller site.

Suggestions for improvement: 
Update this page to reflect the newest version of ruby that has been confirmed to work with rhc on windows (currently 2.1.7).

Comment 1 Rory Thrasher 2016-05-10 17:48:13 UTC
We have found a solution for using rhc on windows with Ruby version 2.2.x, so instead of noting that Ruby 2.2.x or newer doesn't work - the docs should probably point users to building the gem themselves (basic instructions below) if they want to use Ruby 2.2.x or newer.  




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 is necessary for using Ruby 2.2.x or newer on windows.


1. Like before, 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 use rhc as before.