SSL Error when trying to use Twitter Gem for Ruby on Rails (SSLv3 read server key exchange B: bad ecpoint)
I'm trying to use the Twitter Gem with my rails application. In my controller, I attempt to request a user's tweets:
def show @user = User.find(params[:id]) if !@user.twitter_id.nil? @tweets = $twitter.user_timeline(@user.twitter_id, count: 10) end end
When I load this page, I get this error:
Twitter::Error (SSL_connect returned=1 errno=0 state=SSLv3 read server key exchange B: bad ecpoint):app/controllers/users_controller.rb:13:in `show' Rendered /Users/username/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.2/lib/action_dispatch/middleware/templates/rescues/_source.erb (4.4ms) Rendered /Users/username/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.3ms) Rendered /Users/username/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (41.7ms) Rendered /Users/username/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (93.5ms)
I am using a Mac with OSX 10.8 Any idea what my problem might be? Googling revealed it might be bad SSL certificates, but I couldn't find a solution that fixed my problem. Thanks!