You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: I have a Document which does not contain any conflicts, but has a HTTP Content-Type of 'multipart/mixed'. Because of this, I get "NotImplementedError: No serializer has been registered for content type "multipart/mixed" " errors.
I have a riak document which returns the following (removed identifying info) curl (-v) value:
seomoz@silo-app1:/var/www/vhosts/silo/current$ curl riakhost:8098/riak/subscriptions/subscription_id
* About to connect() to riakhost port 8098 (#0)
* Trying xx.yy.zz.kk... connected
* Connected to riakhost (xx.yy.zz.kk) port 8098 (#0)
> GET /riak/subscriptions/subscription_id HTTP/1.1
> Authorization: Basic YWRtaW46cm85cnRlNnZlNnJpcg==
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: riakhost:8098
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Riak-Vclock: a85hYGDgymDKBVIcs/tdtwWou13OYEpkymNluHJqz0k+qNRuWcu/AWqLD0GleDgOwKVetCdVBqgtigJK8QGlYliPoeravuYLUIoRZKCWzikUXUEie4BS3ECpjt2RcKl8xZVWASH/TYFSQkCp/5Wr4VL+m68WBkScdgJKGQKlprWuhUul1zFoBNrls0LtEpfZDpfKZNqzNtDq9ESgFCtQ6pcSQqpDZ9vJQDstEagusFQWAA==
< X-Riak-Meta-Body-Checksum: 61e1b263f7200f8530dc438fb560e73a
< Vary: Accept-Encoding
< Server: MochiWeb/1.1 WebMachine/1.9.0 (someone had painted it blue)
< Link: </riak/subscriptions>; rel="up"
< Last-Modified: Fri, 15 Mar 2013 04:43:38 GMT
< ETag: "HFtGR9Dq6LRFNONqVhN1H"
< Date: Thu, 21 Mar 2013 18:58:14 GMT
< Content-Type: multipart/mixed
< Content-Length: 5191
<
{"schema_version":3,"dates_scheduled":["2011-10-13","2011-10-20","2011-10-27","2011-11-03","2011-11-10","2011-11-17"],"dates_finalized":["2011-10-13","2011-10-20","2011-10-27"]}
* Connection #0 to host riakhost left intact
* Closing connection #0
Repro steps:
Subscription.find('subscription_id')
Actual Results:
irb(main):001:0> sub = Subscription.find('subscription_id')
NotImplementedError: No serializer has been registered for content type "multipart/mixed"
from /var/www/vhosts/silo/shared/bundle/ruby/1.9.1/gems/riak-client-1.0.5/lib/riak/serializers.rb:26:in `block in serializer_for'
from /var/www/vhosts/silo/shared/bundle/ruby/1.9.1/gems/riak-client-1.0.5/lib/riak/serializers.rb:25:in `fetch'
from /var/www/vhosts/silo/shared/bundle/ruby/1.9.1/gems/riak-client-1.0.5/lib/riak/serializers.rb:25:in `serializer_for'
from /var/www/vhosts/silo/shared/bundle/ruby/1.9.1/gems/riak-client-1.0.5/lib/riak/serializers.rb:19:in `deserialize'
from /var/www/vhosts/silo/shared/bundle/ruby/1.9.1/gems/riak-client-1.0.5/lib/riak/robject.rb:253:in `deserialize'
from /var/www/vhosts/silo/shared/bundle/ruby/1.9.1/gems/riak-client-1.0.5/lib/riak/robject.rb:143:in `data'
from /var/www/vhosts/silo/releases/20130316011131/lib/concerns/versionable.rb:42:in `instantiate'
from /var/www/vhosts/silo/releases/20130316011131/lib/models/subscription.rb:383:in `instantiate'
from /var/www/vhosts/silo/shared/bundle/ruby/1.9.1/bundler/gems/ripple-f866ddd5e2b0/lib/ripple/document/finders.rb:113:in `find_one'
from /var/www/vhosts/silo/shared/bundle/ruby/1.9.1/bundler/gems/ripple-f866ddd5e2b0/lib/ripple/document/finders.rb:55:in `find'
from (irb):1
from /usr/local/bin/irb:12:in `<main>'
Expected Results: the document loads correctly.
Work Around?:
I have found a work around:
Riak::Serializers['multipart/mixed'] = Riak::Serializers::ApplicationJSON
sub = Subscription.find('subscription_id')
This loads the document so I can then save it.
I'm looking into this more, but I fiugured I'd file a bug.
The text was updated successfully, but these errors were encountered:
Does your application model override Ripple::Document#update_robject? If so, be sure to either call super first, or set the content_type properly. Aside from saving back objects that were once in conflict with the multipart/mixed content type, I don't see how this could occur without something else interfering.
Does your application model override Ripple::Document#update_robject? If
so, be sure to either call super first, or set the content_type properly.
Aside from saving back objects that were once in conflict with the
multipart/mixed content type, I don't see how this could occur without
something else interfering.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/315#issuecomment-15260370
.
Description: I have a Document which does not contain any conflicts, but has a HTTP Content-Type of 'multipart/mixed'. Because of this, I get "NotImplementedError: No serializer has been registered for content type "multipart/mixed" " errors.
Settings:
Precondition:
Repro steps:
Actual Results:
Expected Results: the document loads correctly.
Work Around?:
I have found a work around:
This loads the document so I can then save it.
I'm looking into this more, but I fiugured I'd file a bug.
The text was updated successfully, but these errors were encountered: