0

I'm using Couchbase 1.8.0 on Mac OS X along with the Ruby libraries to access it. I deleted the default bucket and created by own bucket called 'mybucket', with the password 'password'. I'm accessing the bucket with the following Ruby code:

url = "http://127.0.0.1:8091/pools/default"
Couchbase.new(url, :bucket_name => 'mybucket', :bucket_password => 'password')

and I'm getting the following error:

Couchbase::Error::BucketNotFound (HTTP/1.1 404 Object Not Found
Server: Couchbase Server 1.8.0r_74_g85f643d-community

Does any one have any thoughts? I've tried rebooting both the server and the rails app (even though I shouldn't have to) and it's still not connecting. I'm not really sure what I'm doing wrong.

Thanks!

4

1 回答 1

2

因此,看起来 Couchbase 网站上的文档在如何连接 Ruby 库方面是错误的。正确的语法如下。

bucket = 'mybucket'
password = 'mypassword'
Couchbase.connect("http://localhost:8091/pools/default", :bucket => bucket, :username => bucket, :password => password)

希望这可以帮助任何有同样问题的人!

于 2012-07-03T21:30:13.330 回答