Great thanks, I didn't realize I needed the sync gateway. I got it setup 
(created a memcached bucket called sync_gateway) and running.
./sync_gateway 
09:00:56.930144 Configured Go to use all 8 CPUs; setenv GOMAXPROCS to 
override this
09:00:56.930237 Opening db /sync_gateway as bucket "sync_gateway", pool 
"default", server <walrus:>
09:00:56.930314 Opening Walrus database sync_gateway on <walrus:>
*09:00:56.930646 WARNING: Database "sync_gateway" sync function undefined; 
using default -- rest.(*ServerContext).AddDatabaseFromConfig() at 
server_context.go:196*
09:00:56.930653 Starting profile server on 
09:00:56.930660 Starting admin server on 127.0.0.1:4985
09:00:56.932185 Starting server on :4984 ...

 Now when I put to the gateway (port 4985) I get:
{"error":"not_found","reason":"no such database \"default\""}

However, I definitely have a default bucket with no authentication

On Friday, February 14, 2014 8:30:10 AM UTC-8, Jens Alfke wrote:
>
>
> On Feb 14, 2014, at 8:01 AM, Joel Saltzman <[email protected]<javascript:>> 
> wrote: 
>
> > I tried: 
> > curl -X POST -u Administrator:mypass 
> http://127.0.0.1:8091/beer-sample/_user/jens --data 
> '{"name":"jens","email":"[email protected] 
> <javascript:>","password":"1234"}}' 
>
>
> Port 8091 is Couchbase Server, not the Sync Gateway. 
>
> > I also tried the admin port: 
> > curl -X PUT http://127.0.0.1:4985/beer-sample/_user/jens --data 
> '{"name":"jens","email":"jens@ someemail.com","password":"1234"}}' 
> > I receive: 
> > Failed connect to 127.0.0.1:4985; Connection refused 
>
> "Connection refused" implies the gateway isn't running. (Tech support: "Is 
> your computer turned on?" :) 
>
> Also, even after you start the gateway I think that request will be 
> rejected (with a 400) because it's not declared as JSON. You'll need to add 
> a "Content-Type: application/json" header. This gets somewhat awkward with 
> curl; I much prefer httpie, which lets me write that as 
>         http PUT :4985/beer-sample/_user/jens name=jens email=
> [email protected] <javascript:> password=1234 
>
> (But if you stick with curl, it also lets you omit the "http://127.0.0.1"; 
> prefix of the URL. Saves a lot of typing in the long run!) 
> (Also, you can skip the "name=jens" part because the name's already 
> specified in the URL.) 
>
> —Jens 
>
> PS: If something in the docs led you astray, please let us know where the 
> problematic part is so we can clarify or fix it. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/f58e8c5e-f1fc-46a9-bea8-df286833e403%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to