Can't access RubyGems - possibly due to SSL? [duplicate]
Here is a quick solution:
Go to your gem file and change
source 'https://rubygems.org'
to
source 'http://rubygems.org' #remove the 's'
Check this similar question on StackOverflow for more solutions and insights into the error :)
Edit:
Based on inputs by @Anthony in the comments below, here is a more permanent solution :
Download : AddTrustExternalCARoot-2048.pem.(Note: File must have .pem as extension. Browsers like Chrome will try to save it as plain text file. Ensure you change the filename to have .pem in it after you have downloaded it.)
Now Run the following in your command prompt:
C:\>gem which rubygems
Thiw will give you a path where you need to place the above .pem
file. Navigate inside the directory to which the path points. Inside it locate ssl_certs
directory and copy the .pem file we obtained from previous step inside.
This shall do the trick!
It's specific to a windows permission issue, you can read the entire scope of the issue here
For the tl;dr -
Step 1: Obtain the new trust certificate
Download: AddTrustExternalCARoot-2048.pem
Step 2: Locate RubyGems certificate directory in your installation
C:\>gem which rubygemsC:/Ruby21/lib/ruby/2.1.0/rubygems.rb
We want to open the path listed above:
C:\>start C:\Ruby21\lib\ruby\2.1.0\rubygems
Step 3: Copy new trust certificate
Now, locate ssl_certs
directory and copy the .pem
file we obtained from step 1 inside.