I had suspected that, although the couchrest docs say that database!() call
creates the database if it doesn't already exist. Looking in the source for
that method, it seems to be doing that.
Regardless, I did create the couchrest-test DB by hand through the _utils
views, but it still doesn't work.
Wil
On Thu, Sep 11, 2008 at 2:21 PM, Sho Fukamachi <[EMAIL PROTECTED]>wrote:
> Wil,
>
> did you create the couchrest-test DB first?
>
> If the DB is missing the error looks exactly like you pasted.
>
> Sho
>
>
>
>
> On 12/09/2008, at 3:47 AM, Wil Chung wrote:
>
> Hi,
>>
>> I just started using CouchDB, and I decided to give CouchRest a shot.
>> Since
>> I saw JChris post here before, I figured this would be a good place to
>> ask--or if anyone else has used CouchRest before.
>>
>> I'm having trouble just getting CouchRest to talk to the CouchDB. I am
>> using couchdb 0.8.1 and couchrest 0.9.2
>>
>> irb(main):009:0> @db = CouchRest.database!("
>> http://localhost:5984/couchrest-test")
>> => #<CouchRest::Database:0xb7a7346c @name="/couchrest-test", @root="
>> http://localhost:5984//couchrest-test", @host="http://localhost:5984",
>> @server=#<CouchRest:0xb7a7364c @uuid_batch_count=1000, @uri="
>> http://localhost:5984">>
>> irb(main):010:0> response = @db.save({:key => 'value', 'another key' =>
>> 'another value'})
>> RestClient::ResourceNotFound: RestClient::ResourceNotFound
>> from
>> /usr/lib/ruby/gems/1.8/gems/rest-client-0.7/lib/rest_client.rb:186:in
>> `process_result'
>> from
>> /usr/lib/ruby/gems/1.8/gems/rest-client-0.7/lib/rest_client.rb:158:in
>> `transmit'
>> from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
>> from
>> /usr/lib/ruby/gems/1.8/gems/rest-client-0.7/lib/rest_client.rb:155:in
>> `transmit'
>> from
>> /usr/lib/ruby/gems/1.8/gems/rest-client-0.7/lib/rest_client.rb:102:in
>> `execute_inner'
>> from
>> /usr/lib/ruby/gems/1.8/gems/rest-client-0.7/lib/rest_client.rb:94:in
>> `execute'
>> from
>> /usr/lib/ruby/gems/1.8/gems/rest-client-0.7/lib/rest_client.rb:81:in
>> `execute'
>> from
>> /usr/lib/ruby/gems/1.8/gems/rest-client-0.7/lib/rest_client.rb:45:in
>> `post'
>> from
>> /usr/lib/ruby/gems/1.8/gems/jchris-couchrest-0.9.2/lib/couch_rest.rb:78:in
>> `post'
>> from
>> /usr/lib/ruby/gems/1.8/gems/jchris-couchrest-0.9.2/lib/couch_rest.rb:61:in
>> `next_uuid'
>> from
>> /usr/lib/ruby/gems/1.8/gems/jchris-couchrest-0.9.2/lib/database.rb:68:in
>> `save'
>> from (irb):10
>> from :0
>>
>> I found this in the log:
>>
>> [info] [<0.65.0>] HTTP Error (code 404): {not_found,unknown_private_path}
>> [info] [<0.65.0>] 127.0.0.1 - - "POST /_uuids" 404
>>
>> I'm not sure what I'm doing wrong. Is there something that I'm missing?
>> Thanks.
>>
>> Wil
>> --
>> http://webjazz.blogspot.com
>>
>
>
--
http://www.mobtropolis.com
http://webjazz.blogspot.com