Ask A Question


You’re not receiving notifications from this thread.

SSL_connect returned=1 errno=0 state=error: certificate verify failed

Brandon Morales asked in General

I am new to Ruby on Rails I have followed this tutorial:

It lets me reach the login and even accept the connection on the facebook side. I thought it might have been the gem folder but it matches perfectly with the one in the tutorial. Which is this:

source ''

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>='
# Use sqlite3 as the database for Active Record
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more:
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more:
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platform: :mri

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console'
  gem 'listen', '~> 3.0.5'
  # Spring speeds up development by keeping your application running in the background. Read more:
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'devise'
gem 'omniauth-facebook'

Here is the error I get:

SSL_connect returned=1 errno=0 state=error: certificate verify failed
Extracted source (around line #933):

start = Process.clock_gettime Process::CLOCK_MONOTONIC
# to_io is required because SSLSocket doesn't have wait_readable yet
case s.connect_nonblock(exception: false)
when :wait_readable; s.to_io.wait_readable(timeout)
when :wait_writable; s.to_io.wait_writable(timeout)
else; break

Rails.root: C:/rubyTest/facebook-omniauth-demo-master

Application Trace | Framework Trace | Full Trace
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:933:in `connect_nonblock'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:933:in `connect'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:852:in `start'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/net/http.rb:1398:in `request'
faraday (0.9.2) lib/faraday/adapter/net_http.rb:82:in `perform_request'
faraday (0.9.2) lib/faraday/adapter/net_http.rb:40:in `block in call'
faraday (0.9.2) lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
faraday (0.9.2) lib/faraday/adapter/net_http.rb:32:in `call'
faraday (0.9.2) lib/faraday/request/url_encoded.rb:15:in `call'
faraday (0.9.2) lib/faraday/rack_builder.rb:139:in `build_response'
faraday (0.9.2) lib/faraday/connection.rb:377:in `run_request'
oauth2 (1.2.0) lib/oauth2/client.rb:93:in `request'
oauth2 (1.2.0) lib/oauth2/client.rb:138:in `get_token'
oauth2 (1.2.0) lib/oauth2/strategy/auth_code.rb:29:in `get_token'
omniauth-oauth2 (1.4.0) lib/omniauth/strategies/oauth2.rb:89:in `build_access_token'
omniauth-facebook (4.0.0) lib/omniauth/strategies/facebook.rb:110:in `build_access_token'
omniauth-oauth2 (1.4.0) lib/omniauth/strategies/oauth2.rb:73:in `callback_phase'
omniauth-facebook (4.0.0) lib/omniauth/strategies/facebook.rb:67:in `block in callback_phase'
omniauth-facebook (4.0.0) lib/omniauth/strategies/facebook.rb:131:in `with_authorization_code!'
omniauth-facebook (4.0.0) lib/omniauth/strategies/facebook.rb:66:in `callback_phase'
omniauth (1.3.1) lib/omniauth/strategy.rb:227:in `callback_call'
omniauth (1.3.1) lib/omniauth/strategy.rb:184:in `call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
warden (1.2.6) lib/warden/manager.rb:34:in `catch'
warden (1.2.6) lib/warden/manager.rb:34:in `call'
rack (2.0.1) lib/rack/etag.rb:25:in `call'
rack (2.0.1) lib/rack/conditional_get.rb:25:in `call'
rack (2.0.1) lib/rack/head.rb:12:in `call'
rack (2.0.1) lib/rack/session/abstract/id.rb:222:in `context'
rack (2.0.1) lib/rack/session/abstract/id.rb:216:in `call'
actionpack ( lib/action_dispatch/middleware/cookies.rb:613:in `call'
activerecord ( lib/active_record/migration.rb:552:in `call'
actionpack ( lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
activesupport ( lib/active_support/callbacks.rb:97:in `__run_callbacks__'
activesupport ( lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
activesupport ( lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack ( lib/action_dispatch/middleware/callbacks.rb:36:in `call'
actionpack ( lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack ( lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack ( lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch'
web-console (3.4.0) lib/web_console/middleware.rb:18:in `call'
actionpack ( lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties ( lib/rails/rack/logger.rb:36:in `call_app'
railties ( lib/rails/rack/logger.rb:24:in `block in call'
activesupport ( lib/active_support/tagged_logging.rb:70:in `block in tagged'
activesupport ( lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport ( lib/active_support/tagged_logging.rb:70:in `tagged'
railties ( lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack ( lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.1) lib/rack/method_override.rb:22:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call'
activesupport ( lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack ( lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack ( lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
railties ( lib/rails/engine.rb:522:in `call'
puma (3.6.2) lib/puma/configuration.rb:225:in `call'
puma (3.6.2) lib/puma/server.rb:578:in `handle_request'
puma (3.6.2) lib/puma/server.rb:415:in `process_client'
puma (3.6.2) lib/puma/server.rb:275:in `block in run'
puma (3.6.2) lib/puma/thread_pool.rb:116:in `block in spawn_thread'


 "state"=>"93578894dd7af2400b5728d5cd0652d78ff3f8d16873b462" ```

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 79,047+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2023 GoRails, LLC. All rights reserved.