You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is an issue with the gem or a networking issue on my side, but I've been having connection issues when trying to use the streaming API. I've tested this on multiple machines and received the same error shown below. Using the latest version of the twitter gem v5.15.0.
Any suggestions would be much appreciated.
Error
[vagrant@localhost vagrant]$ ruby twitter.rb
/usr/local/rvm/gems/ruby-2.2.1/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in `initialize': Network is unreachable - connect(2) for "199.16.156.217" port (Errno::ENETUNREACH)
from /usr/local/rvm/gems/ruby-2.2.1/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in `new'
from /usr/local/rvm/gems/ruby-2.2.1/gems/twitter-5.15.0/lib/twitter/streaming/connection.rb:16:in `stream'
from /usr/local/rvm/gems/ruby-2.2.1/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:119:in `request'
from /usr/local/rvm/gems/ruby-2.2.1/gems/twitter-5.15.0/lib/twitter/streaming/client.rb:58:in `sample'
from twitter.rb:10:in `<main>'
twitter.rb
require 'twitter'
client = Twitter::Streaming::Client.new do |config|
config.consumer_key = 'HIDDEN'
config.consumer_secret = 'HIDDEN'
config.access_token = 'HIDDEN'
config.access_token_secret = 'HIDDEN'
end
client.sample do |object|
puts object.text if object.is_a?(Twitter::Tweet)
end
I'm not sure if this is an issue with the gem or a networking issue on my side, but I've been having connection issues when trying to use the streaming API. I've tested this on multiple machines and received the same error shown below. Using the latest version of the
twitter
gem v5.15.0.Any suggestions would be much appreciated.
Error
twitter.rb
Ruby Version
The text was updated successfully, but these errors were encountered: