Red Hat Bugzilla – Bug 1289140
Current Latest version of ruby does not work with rhc for windows
Last modified: 2016-07-25 16:02:38 EDT
Section Number and Name:
126.96.36.199.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).
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.