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 trial

Ruby

Bahi Hussien
PLUS
Bahi Hussien
Courses Plus Student 13,128 Points

(Solved) Rails "read server certificate B: certificate verify failed"

I'm building a project using omniauth and devise that allows users to log-in with facebook. then i started to get the following error

Faraday::SSLError SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

: i have tried to reinstall ruby and get rails, the following error shows wget http://production.cf.rubygems.org/rubygems/rubygems-update-2.0.3.gem

Could not find a valid gem 'rails' (>= 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/specs.4.8.gz)

then i run the following command

ruby -ropenssl -e 'p OpenSSL::OPENSSL_VERSION' "OpenSSL 1.0.1j 15 Oct 2014"

please help.

Updated =>

this article solved the problem of the SSL https://gist.github.com/luislavena/f064211759ee0f806c88

3 Answers

Hi Bahi,

Here's solution to common issues, you can try some of these methods to see if it works for you - http://stackoverflow.com/questions/3977303/omniauth-facebook-certificate-verify-failed/5512518#5512518

Bahi Hussien
PLUS
Bahi Hussien
Courses Plus Student 13,128 Points

Hi, Salman. Thank you for the fast response.

I have went through the previous link this morning and i couldn't solve the problem. Actually, now i'm not able to reinstall rails after removing it. getting the following

Could not find a valid gem 'rails' (>= 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/specs.4.8.gz)