Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDamian Millan
7,103 PointsWARNING: Unable to pull data from 'https://rubygems.org/'
When attempting to install bundler I first ran into this problem:
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect retur ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ( https://rubygems.org/latest_specs.4.8.gz)
Since then, I have added '-r --source http://rubygems.org/' to the end of each gem I install and it appears to work, but I recived multiple instances of this error:
WARNING: Unable to pull data from 'https://rubygems.org/': SSL_connect returned =1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (htt ps://rubygems.org/specs.4.8.gz)
Now when I try to run 'rails new testapp' it will not complete without telling me to install a new gem every time. Each time I install the gem specified, and run it again to be told that:
An error occurred while installing [gem], and Bundler cannot
continue.
Make sure that gem install [gem] -v '[version number]'
succeeds before bundling.
6 Answers
Richard Atanasov
6,804 PointsThe reason for this issue is because there is an 'SSL' certificate error when you try to connect to the 'rubygems.org' server via the command prompt. What you need to do is follow the instructions listed here: https://gist.github.com/luislavena/f064211759ee0f806c88#manual-solution-to-ssl-issue
Basically you create a new '.pem' file and save it inside 'C:\Ruby21-x64\lib\ruby\2.1.0\rubygems\ssl_certs' folder.
NOTE: your path might be a little different but this is the basic idea!
Damian Millan
7,103 PointsI could bloody kiss you.
Travis Stewart
15,188 PointsSomebody give this man a medal! Thanks Richard!
Michael Bichsel
4,015 PointsRich, you're my dude.
Danny Slewa
2,294 Pointsi dont even get what to do???? create a .pem file?? i get this exact error but im so confused.
Danny Slewa
2,294 Pointsi open the ssl certificate link like you tell me too but its all plain text...what do i do from there.
Richard Atanasov
6,804 PointsI'm sorry its confusing you bro! The reason for the issue is given on the site as well; here is the excerpt:
"The particular case of RubyGems (the command line tool) is that it requires to bundle inside of its code the trust certificates, which allow RubyGems to establish a connection with the servers even when base operating system is unable to verify the identity of them."
Here are the steps taken from the link I gave before (so you can see an overview of directions):
Step 1: Obtain the new trust certificate
Step 2: Locate RubyGems certificate directory in your installation
Step 3: Copy new trust certificate
Step 4: Profit
P.S. I think this step maybe where you tripped up:
"IMPORTANT: 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."
I hope this cleared things up!
Danny Slewa
2,294 Pointsi did that but it didnt work. this was on a windows. i ended up getting rid of the windows and i bought myself an imac yesterday. im going to try it now on this