Bug 1289140 - Current Latest version of ruby does not work with rhc for windows
Current Latest version of ruby does not work with rhc for windows
Product: OpenShift Online
Classification: Red Hat
Component: Documentation (Show other bugs)
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Vikram Goyal
Vikram Goyal
Vikram Goyal
Depends On:
Blocks: 1288667
  Show dependency treegraph
Reported: 2015-12-07 09:14 EST by Eric Jones
Modified: 2016-07-25 16:02 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-25 16:02:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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-07 09:14:00 EST
Document URL: 

Section Number and Name: 
⁠ 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 13:48:13 EDT
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.

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