When testing the datasift ruby gem locally be sure to turn SSL off

Here's how to go about not getting caught out with this

I am getting to play with the awesome DataSift service as part of a project I am working on in Rumble and I was coming across some weird issues when testing locally, the consume would start but never actually get anywhere, it would create the connection but not fail or return anything, it would just sit there.

The fix that worked for me isn’t something I would recommend in production, but for local testing I just turned off the need to use SSL for the user object.

So when I create my user like this;

@user  = DataSift::User.new("#{username}", "#{api_key}")

I then call the following;

@user.enableSSL(false)

Now when I do something like;

@consumer = @user.getConsumer(DataSift::StreamConsumer::TYPE_HTTP, 'my_stream_hash')
@consumer.consume(true) do
    ...
end

Everything works as expected :-)

Recent posts View all

Web DevProductivity

Keeping on top of website updates

Learn what website updates are, what they entail, why they are important, and how we can help

Freelancing

Getting the most out of your agency

Here are some tips based on years of working with, for, and as an agency on how to get the most out of any work you do.