You can clone with
HTTPS or Subversion.
I'm unable to post a ticket in my rails app. Here's a gist with all the information I could get:
I am able to post the ticket if I edit lib/zendesk_api/client.rb and comment out builder.request :multipart. Of course that's no solution, because it would break file uploads.
I wasn't able to reproduce this using the same Gemfile and a clean Rails app. Is there any reason String might respond to content_type?
That's exactly right. Seems that ruby-filemagic defines that method for String:
I'm not sure why they do that. Doesn't seem to be required for the core functionality provided by that gem. Do you think we should change object detection code in zendesk client or should I contact someone at filemagic and ask for the rationale of their string extension?
It's actually a problem between Faraday's Multipart middleware and Filemagic 1
I'd like to see what we can do upstream before working around it in this gem.
This PR should fix it: nicksieger/multipart-post#20
I've changed the Gemfile for now to point to my fork of multipart-post. Let me know if this helps fix your problem.
Oh, I've already posted on Faraday: https://github.com/technoweenie/faraday/issues/211
Let me see if this solved the problem.
Your change to mulipart-post has fixed the issue for me, but I had to put this in my app's gemfile:
gem "multipart-post", :git => "git://github.com/steved555/multipart-post.git"
The change to zendesk gemfile doesn't affect bundler. You would have to modify your gemspec.
It seems that your pull request was merged into multipart-post 2.0.0, but Faraday 0.8.x allows only multipart-post < 2.0. Faraday 0.9.0 was released and it allows newer multipart-post, but there is no faraday_middleware compatible with faraday 0.9. Note that there is faraday_middleware 0.9, but it looks like some autorelease - it's gem spec was not updated to allow newer faraday.
It seems that there are some backward incompatible changes in faraday 0.9 that prevent immediate support in the middleware. lostisland/faraday_middleware#74 tracks some of the required updates. You'll have to wait for that gem to be updated before you can change your dependencies.
Faraday 0.9 compatibility
* Removes all faraday_middleware dependencies
* Updates multipart-post for #61
I'm going to close this and track the Faraday upgrade in #152