lundi 20 avril 2015

DB Defaults to SQLite3 on DigitalOcean

I'm having trouble setting up my rails app on digital ocean (w/ubuntu&nginx&passenger). My app won't connect to the postgresql db on DO and seems to default to SQLite3 for some reason. In my local environment everything is fine and connects to postgresql but at DO this error pops up in the browser: "SQLite3::CantOpenException". I'm sort of new to configuring environments, but I added this to the .bashrc file, thinking maybe this is why it's not working, but the following line of code does nothing: export APP_ENV="production" I'm not sure what I'm doing wrong, when I created the app I even did it like this: rails new myproject -T -d postgresql I also read a tutorial that advised me to just put my password into my app, but that seems like a completely ridiculous thing to do. I'm pretty sure I need to set up environment variables but I thought that this is what the postgresql at the end of "rails new myproject -T -d postgresql" does...I'm lost.

Aucun commentaire:

Enregistrer un commentaire