Giter VIP home page Giter VIP logo

Comments (4)

mloughran avatar mloughran commented on July 30, 2024

This looks like a bug in httpclient when running ruby 2.1 - see nahi/httpclient#180 for more info. I'd recommend just using a Ruby 2.0 (not head) until this is fixed.

On 14 Oct 2013, at 21:19, Marcel [email protected] wrote:

Hi All,

My question is the following, I'm using the pusher gem and if I follow the instructions to send a message in from ruby (which I execute in irb), I get the below rendered error.

The message does get send to the pusher debugger window successfully, it's just that this error message is thrown.

Additionally, this error is thrown only when I attempt to send messages from my VPS, on my local machine all is fine.

Could you guys help me out on this one?

Thanks in advance?

Cheers,
Marcel

head :001 > require 'pusher'
=> true
head :002 > Pusher.app_id = 'APP_ID'
=> "APP_ID"
head :003 > Pusher.app_id
=> "APP_ID"
head :004 > Pusher.key = 'MY_KEY'
=> "MY_KEY"
head :005 > Pusher.secret = 'MY_SECRET'
=> "MY_SECRET"
head :006 > Pusher.trigger('my-channel', 'my-event', {:message => 'hello world'})
NoMethodError: undefined method meta_add_field' for "":String
from /home/tiny/.rvm/gems/ruby-head/gems/httpclient-2.3.4.1/lib/httpclient/http.rb:236:inset_body_encoding'
from /home/tiny/.rvm/gems/ruby-head/gems/httpclient-2.3.4.1/lib/httpclient/http.rb:325:in set_headers'
from /home/tiny/.rvm/gems/ruby-head/gems/httpclient-2.3.4.1/lib/httpclient.rb:1138:indo_get_header'
from /home/tiny/.rvm/gems/ruby-head/gems/httpclient-2.3.4.1/lib/httpclient.rb:1086:in do_get_block'
from /home/tiny/.rvm/gems/ruby-head/gems/httpclient-2.3.4.1/lib/httpclient.rb:887:inblock in do_request'
from /home/tiny/.rvm/gems/ruby-head/gems/httpclient-2.3.4.1/lib/httpclient.rb:981:in protect_keep_alive_disconnected'
from /home/tiny/.rvm/gems/ruby-head/gems/httpclient-2.3.4.1/lib/httpclient.rb:886:indo_request'
from /home/tiny/.rvm/gems/ruby-head/gems/httpclient-2.3.4.1/lib/httpclient.rb:774:in request'
from /home/tiny/.rvm/gems/ruby-head/gems/pusher-0.12.0/lib/pusher/request.rb:28:insend_sync'
from /home/tiny/.rvm/gems/ruby-head/gems/pusher-0.12.0/lib/pusher/resource.rb:18:in post'
from /home/tiny/.rvm/gems/ruby-head/gems/pusher-0.12.0/lib/pusher/client.rb:144:inpost'
from /home/tiny/.rvm/gems/ruby-head/gems/pusher-0.12.0/lib/pusher/client.rb:226:in trigger'
from (irb):6
from /home/tiny/.rvm/rubies/ruby-head/bin/irb:15:in'


Reply to this email directly or view it on GitHub.

from pusher-http-ruby.

mwijnen avatar mwijnen commented on July 30, 2024

Thanks, that was it! I changed my ruby version and now all is working. Thanks again.

from pusher-http-ruby.

jonobattle avatar jonobattle commented on July 30, 2024

Just to add to this, I had the same issue. Was running Ruby 2.1 and then went back to 2.0 and the problem was fixed.

from pusher-http-ruby.

zimbatm avatar zimbatm commented on July 30, 2024

Fixed in v0.14.2 which requires httpclient 2.4 and up

from pusher-http-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.