I'm trying to display tweets using gem tweetstream
and following the guide at https://github.com/tweetstream/tweetstream
In my tweets_helper.rb
require "twitter" require 'tweetstream'
module TweetsHelper
@@client = Twitter::REST::Client.new do |config|
config.consumer_key = Rails.application.config.twitter_key
config.consumer_secret = Rails.application.config.twitter_secret
config.access_token = Rails.application.config.twitter_oauth_token
config.access_token_secret = Rails.application.config.twitter_oauth_secret
end
def user_timeline
@@client.user_timeline
end
TweetStream.configure do |config|
config.consumer_key = Rails.application.config.twitter_key
config.consumer_secret = Rails.application.config.twitter_secret
config.oauth_token = Rails.application.config.twitter_oauth_token
config.oauth_token_secret = Rails.application.config.twitter_oauth_secret
config.auth_method= :oauth
end
TweetStream::Client.new.track('Pink Floyd') do |status|
puts "#{status.text}"
end
end
But this throws me this error in the terminal and shuts down the localserver
c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tweetstream-2.6.1/lib/tweet stream/client.rb:400: warning: epoll is not supported on this platform c:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/tweetstream-2.6.1/lib/tweet stream/client.rb:401: warning: kqueue is not supported on this platform terminate called after throwing an instance of 'std::runtime_error' what(): Encryption not available on this event-machine
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
However the server runs if I remove
TweetStream::Client.new.track('Pink Floyd') do |status|
puts "#{status.text}"
end
How do I fix this error?
UPDATE
I think all signs point to installing libssl-dev https://github.com/plamoni/SiriProxy/issues/41. On Ubuntu it is aptitude install libssl-dev
.
How do I do it on windows 8?