What's the error now, with the existing DB? I get no errors with your code example.
Sho On 12/09/2008, at 4:27 AM, Wil Chung wrote:
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 forthat method, it seems to be doing that.Regardless, I did create the couchrest-test DB by hand through the _utilsviews, but it still doesn't work. WilOn 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.SinceI saw JChris post here before, I figured this would be a good place toask--or if anyone else has used CouchRest before.I'm having trouble just getting CouchRest to talk to the CouchDB. I amusing 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" 404I'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
smime.p7s
Description: S/MIME cryptographic signature
