- 官方openshift下windows部署教程
- 下载ruby:ruby官网
The Client Tools are known to work well with Ruby versions 1.9.3 and 2.0.0 on Windows, based on the community feedback. We recommend downloading and installing one of those versions.
推荐使用ruby1.9.3或2.0.0。
If the Ruby version message does not display, the Ruby executable may not have been added to the path. Restart the installation process and ensure the Add Ruby executables to your PATH check box is selected as in the image above.
将ruby加入环境变量。
- 下载git:git官网
During the installation process, select the Run Git from the Windows Command Link Prompt checkbox so that Git can be run from the command line. Also, select Checkout Windows-style, commit Unix-style line endings, which is the recommended setting. Finally, in order to set up rhc from Git Bash, select Use Windows' default console window to configure the terminal emulator for Git Bash. You can set up rhc from the Windows Powershell or Ruby Command Prompt if you prefer the MinTTY terminal emulator.
安装过程中选择Run Git from the Windows Command Link Prompt
Checkout Windows-style, commit Unix-style line endings
Use Windows' default console window
- 打开cmd,输入
gem install rhc
进行安装
不过此时会出现错误
ERROR: Could not find a valid gem 'rhc' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/latest_specs.4.8.gz)
参考rubygems - Unable to install any gem by Ruby in Windows - Stack Overflow
解决方法:
输入
gem sources --remove https://rubygems.org/
gem sources --add http://rubygems.org/
然后再次输入gem install rhc
安装即可成功。
- 输入rhc setup登陆账号密码。