使用 Twitter gem 时出错,Errno::EAFNOSUPPORT
我在 Heroku 部署中遇到此错误:
Errno::EAFNOSUPPORT: Address family not supported by protocol -
socket2
usrruby19.2libruby1.9.1nethttprb:644:in initialize
usrruby19.2libruby1.9.1nethttprb:644:in open
usrruby19.2libruby1.9.1nethttprb:644:in block in connect
usrruby19.2libruby1.9.1timeoutrb:44:in timeout
当我像这样拨打 Twitter 电话时:
Twitter.profile_image('screen name', :size => 'mini')
此代码按照 gem 的文档在本地工作,但我没有 能够通过谷歌搜索任何有关它的信息。
我的本地设置如下:
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0], MBARI
0x6770, Ruby Enterprise Edition 2011.03
我在 Heroku 上使用ebam-mri-1.9.2 堆栈。
I am getting this error on my Heroku deployment:
Errno::EAFNOSUPPORT: Address family not supported by protocol -
socket2
usrruby19.2libruby1.9.1nethttprb:644:in initialize
usrruby19.2libruby1.9.1nethttprb:644:in open
usrruby19.2libruby1.9.1nethttprb:644:in block in connect
usrruby19.2libruby1.9.1timeoutrb:44:in timeout
When I make a certain call Twitter like so:
Twitter.profile_image('screen name', :size => 'mini')
This code works locally as per the gem's documentation and I've not
been able to Google anything about it.
My local setup is as follows:
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0], MBARI
0x6770, Ruby Enterprise Edition 2011.03
And I am using the bamboo-mri-1.9.2 stack on Heroku.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
协议不支持地址族 - socket(2) (Errno::EAFNOSUPPORT) 这个错误除了时间之外没有其他更好的解决方案。实际上,套接字已经处于运行状态,因此除非并且直到它得到免费没有解决办法。那么你也可以尝试重新启动你的机器。
Address family not supported by protocol - socket(2) (Errno::EAFNOSUPPORT) this error has no other better solution than time.In realit the socket is already in a running state so unless and unrtil it gets free there is no solution to it.Then also you can try by restarting your machine.