hoodiehq / faq

Frequently asked questions about Hoodie
faq.hood.ie
11 stars 3 forks source link

Problems using external CouchDB #114

Closed saschazar21 closed 9 years ago

saschazar21 commented 9 years ago

I tried to use a CouchDB hosted on Iriscouch, without installing a local CouchDB on my Mac. According to this FAQ-section, I set the environment variables to the following:

export COUCH_URL="mydb.iriscouch.com:5984"
export HOODIE_ADMIN_USER="admin"
export HOODIE_ADMIN_PASS="mysecretpassword"

I made sure to create an admin-user on the remote CouchDB, so that everything should work - although when I start my hoodie app, it always hangs on the non-existent local CouchDB-initialization.

Is there a way to get around this?

janl commented 9 years ago

try export COUCH_URL="https://mydb.iriscouch.com:5984"

saschazar21 commented 9 years ago

hmm.. tried that, but it still exits while trying to connect to CouchDB. couchdb_fail

couch.stderr says the following (because, obviously, a local CouchDB-install is non-existent):

line 4: cd: /Contents/Resources/couchdbx-core: No such file or directory
line 5: ./bin/couchdb: No such file or directory
line 4: cd: /Contents/Resources/couchdbx-core: No such file or directory
line 5: ./bin/couchdb: No such file or directory
line 4: cd: /Contents/Resources/couchdbx-core: No such file or directory
line 5: ./bin/couchdb: No such file or directory
line 4: cd: /Contents/Resources/couchdbx-core: No such file or directory
line 5: ./bin/couchdb: No such file or directory
janl commented 9 years ago

can you show a full list of commands that you are running to start Hoodie?

saschazar21 commented 9 years ago

Okay, thanks a lot here - unfortunately it was all my bad. I was setting the environment variables via a shell script, like this.

#!/bin/sh

###########
#
# Set environment variables for geoparse hoodie project
#
###########

echo 'Setting environment variables...'

export COUCH_URL="http://mydb.iriscouch.com:5984"
(...)

But I only executed it via ./env.sh, and the environment variables didn't get set globally. Call the script with source ./env.sh, and everything gets set correctly.

Hoodie is now connecting fine to the remote CouchDB.

Again, thanks a lot. Hope it helps somebody else, who's trying to work only on a remote CouchDB...

janl commented 9 years ago

Glad it’s working for you now! :)

espy commented 9 years ago

Added to our FAQ, thanks for posting your solution!