incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Aljord" <patc...@gmail.com>
Subject Re: couchdb and blobs (using only couchdb or couchrest)
Date Mon, 23 Jun 2008 04:40:39 GMT
Here is how to reproduce the issue:

require 'openid'

@cr = CouchRest.new("http://localhost:5984")
@db = @cr.create_db('couchrest-testy')
blob = OpenID::CryptUtil.hmac_sha1('foo', 'bar')
response = @db.save({:key => blob})

and it gives:
JSON::GeneratorError: source sequence is illegal/malformed
        from /home/pat/gitreps/mymerbapp/lib/couchrest/lib/couch_rest.rb:50:in
`to_json'
        from /home/pat/gitreps/mymerbapp/lib/couchrest/lib/couch_rest.rb:50:in
`post'
        from /home/pat/gitreps/mymerbapp/lib/couchrest/lib/database.rb:54:in
`save'
        from (irb):59
        from :0

not sure if this is a couchrest specific bug, jchris? :)

Mime
View raw message