开发者

when using OmniAuth in rails application why I always met Errno::ETIMEDOUT

开发者 https://www.devze.com 2023-02-06 09:32 出处:网络
I have a rails dummy application, And I\'ve add OmniAuth into my Gemfile. I\'ve add <%= link_to \"Sign in with Twitter\", \"/auth/twitter\" %>

I have a rails dummy application, And I've add OmniAuth into my Gemfile. I've add

<%= link_to "Sign in with Twitter", "/auth/twitter" %>

in my application layout file.

Also I've add the omniauth.rb file in my config\initializers folder.

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :tw开发者_开发知识库itter, 'MYKEY', 'MYSECERT'
end

After I restart of my rails server with rails s and visit http://localhost:3000/auth/twitter

I've always met Errno::ETIMEDOUT, saying Operation timed out - connect(2)

My computer can visit Twitter website meanwhile.

Can anyone help me what was going wrong here? Thank you very much.


That is because of the network issue. After connected with VPN, everything was fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号