couchbase / couchbase-ruby-model

The Active Model implementation for Couchbase Server built on couchbase-ruby-client
61 stars 23 forks source link

Rails app cannot start, hangs on 'no implicit conversion of String into Integer' #39

Closed slash4 closed 7 years ago

slash4 commented 7 years ago

Hello, I run couchbase in docker via a docker-compose file, in parallel with my rails app which is in the same compose file.

I can configure couchbase properly, I can save and recall Objects through the orm so I'm sure there is no problem with network or configuration.

BUT as soon as I declare a view in the model, the app cannot start, and stops on TypeError: no implicit conversion of String into Integer from /usr/local/bundle/gems/couchbase-1.3.15/lib/couchbase/view.rb:39:in[]'`

I have this in the error.log of the couchbase container : [ns_server:error,2017-04-25T16:27:57.122Z,ns_1@127.0.0.1:<0.11995.0>:menelaus_web:loop:187]Server error during processing: ["web request failed", {path,"/pools"}, {method,'GET'}, {type,error}, {what, {case_clause, {error, <<"dial unix /var/run/sasl2/mux: connect: no such file or directory">>}}}, {trace, [{menelaus_auth,verify_rest_auth,2, [{file,"src/menelaus_auth.erl"}, {line,300}]}, {menelaus_web,perform_action,2, [{file,"src/menelaus_web.erl"}, {line,900}]}, {request_throttler,do_request,3, [{file,"src/request_throttler.erl"}, {line,59}]}, {menelaus_web,loop,2, [{file,"src/menelaus_web.erl"}, {line,165}]}, {mochiweb_http,headers,5, [{file, "/home/couchbase/jenkins/workspace/watson-unix/couchdb/src/mochiweb/mochiweb_http.erl"}, {line,94}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,239}]}]}]

But really anything calling the make_http_request of the Bucket class gives the same result. Any ideas ?

slash4 commented 7 years ago

Last but not least, if I visit http://localhost:8091/pools with a web browser, I have what is expected. Everything behaves like make_http_request has a bad root or port, while get/set (called underneath create/save of models) are OK. Very strange.

slash4 commented 7 years ago

OK. Bad credentials. 😓