CouchRest 1.0.1与ruby 1.9.2版本兼容

时间:2011-03-21 09:42:25

标签: ruby-1.9.2 couchrest

在ruby 1.9.2上使用CouchRest Db调用Db时遇到问题。相同的调用与ruby版本1.8.7一起使用。

是否有人使用COuchrest 1.0.1与ruby 1.9.2或类似版本。

我得到的错误是 -

RestClient::BadRequest: 400 Bad Request
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `block in transmit'
    from ~/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:627:in `start'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/rest-client-1.6.1/lib/restclient.rb:76:in `put'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/couchrest-1.0.1/lib/couchrest/rest_api.rb:13:in `put'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/couchrest-1.0.1/lib/couchrest/database.rb:176:in `save_doc'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/couchrest-1.0.1/lib/couchrest/document.rb:42:in `save'
    from ~/.rvm/gems/ruby-1.9.2-p180/gems/couchrest-1.0.1/lib/couchrest/design.rb:61:in `save'

感谢。

1 个答案:

答案 0 :(得分:0)

终于搞定了。没有兼容性问题,该问题与无法在查询中发送数据库名称有关。