Yet another problem with "heroku run python manage.py syncdb"
I have already completed succesfully the first two episodes of GSWD and now I've created a new virtualenv for a personal project.
While installing and setting up everything for my personal project, everything went apparently well untill I run: "heroku run python manage.py syncdb". I get the following error message:
psycopg2.OperationalError: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
The site works locally but not on heroku. When I try to load the admin page on heroku.
I have been searching and found similar problems, but none of the sugested solutions have worked for me.
Answers
Hi, I've been getting exactly the same error as well, were you able to find a solution?
Well, so the admin page uploaded to heroku is still not working. But it does work locally.
I did change the path in the .gitnore file and now it is correct.
I removed the local.py file from the repo with: "git rm --cached studylists/settings/local.py"
I ran "heroku python manage.py syncdb" again.
But the admin page is still not working on Heroku.
Any ideas on what I might be missing?
Thanks!
Sounds like you accidentally included your settings/local.py in the repo, to me. You said you have microblog/settings/local.py in your .gitignore, but is that path in your new project?
On your Heroku dashboard, do you see a postgresql database addon ? If not, you will have to provision one for your app:
$ heroku addons:add heroku-postgresql:dev
then promote it to be DATABASE_URL $heroku pg:promote HEROKU_POSTGRESQL_COLOR
Just to add a little more information:
In the .gitignore file I have:
"microblog/settings/local.py"
In base.py I have:
"DATABASES = {'default' : dj_database_url.config() }"