Comments (4)
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,
Marcelhead :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.
Thanks, that was it! I changed my ruby version and now all is working. Thanks again.
from pusher-http-ruby.
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.
Fixed in v0.14.2 which requires httpclient 2.4 and up
from pusher-http-ruby.
Related Issues (20)
- Handling payload bigger than 10KB HOT 1
- How do you disconnect from the server side? HOT 1
- Pusher event namespaces? HOT 4
- Improve Pusher::Error for server side errors HOT 2
- Outdated changelog HOT 3
- Pusher : Error : {"type":"WebSocketError","error":{"type":"PusherError","data":{"code":1006,"message":"Connection interrupted (200)"}}} HOT 2
- Add Support for Encrypted Channels HOT 1
- Cluster should only override default if non-nil HOT 3
- Pusher.cluster delegates to Pusher::Client#cluster which is not defined HOT 5
- Libsodium dependency HOT 1
- changelog is not clear about breaking changes from v1.xx -> v2.xx HOT 2
- Can't set encryption_master_key_base64 using the global configuration style. HOT 3
- DEPRECATION WARNING `request#content_type` in Rails v7.0.1 HOT 5
- Pusher::Webhook#event for presence channel missing `user_info` HOT 1
- Pusher 2.0.3 + Pusher-Fake 3.0.1 + Webmock breaks HOT 2
- Replace httpclient with a more recent updated http client HOT 3
- Reporting a vulnerability HOT 1
- Pusher.use_tls = false vs Pusher.encrypted = false HOT 2
- Missing method to implement user authentication flow HOT 2
- Rails 7.1 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pusher-http-ruby.