0
votes

I will repost an issue I had with Cloud9 and CouchDB. Original post is still in Cloud9 Support forum without a decent answer.

So I followed the CouchDB installation.

Couchdb starts ok and I can connect to it with CURL.

BUT

When I try to insert stuff using node I get errors (below).

Apache CouchDB 1.5.0 (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.32.0>] Apache CouchDB has started on http://127.0.0.1:5984/
[info] [<0.111.0>] 127.0.0.1 - - GET / 200
[error] [<0.586.0>] Could not open file /var/lib/couchdb/test_db.couch: no such file or directory
[info] [<0.121.0>] 127.0.0.1 - - PUT /test_db/unique_id 404
[error] [<0.656.0>] Could not open file /var/lib/couchdb/test_db.couch: no such file or directory
[info] [<0.585.0>] 127.0.0.1 - - PUT /test_db/unique_id 404

So db_file is missing? Where should I specify this?

I already tried to create the db file manually but that causes CouchDB to crash. Any help would be appreciated?

1

1 Answers

0
votes

I just tried the cloud9 couchdb getting started link you posted and it works for me on a fresh workspace for nodejs.

can you check for the correct folder setup like this?

ls -ld /var/lib/couchdb/ should give you
drwxr-x--- 3 couchdb couchdb 4096 Feb 18 13:05 /var/lib/couchdb//

the problem should not have anything to do with if you use curl or node, so i assume you just did a get with curl to see if couchdb is running but tried the put actions with node?

also make sure couchdb is running as the correct user