Resolving error in installing any gem by Ruby

After installing Ruby installer you might need to install some gems. For example if you are developing with RedHat OpenShift you want to install ‘rhc’ gem to access remote files on OpenShift. To install ‘rhc’ you would run following command.

>gem install rhc

But you might get following error specially on Windows machine.

>gem install rhc
ERROR:  Could not find a valid gem 'rhc' (>= 0), here is why:
          Unable to download data from - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
ERROR:  Possible alternatives: rhc


The problem is due to running over a secure (https) connection to Look at the help for “gem sources –h”, remove the https version and add

Run the following commands to do this.


>gem sources --remove
>gem sources --add

And now you can easily install any gem.


Ask J

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s