Question

Hi I'm actually trying to deploy discourse on Heroku. I'm following the step by step guide here Basic Heroku deployment I'm facing a problem when I try to rake assets:precompile (I'm precompiling locally). The rake command is aborted, saying to me that

No such file or directory: mydirectories/discourse/config/database.yml

When I rake assets:precompile I'm in production environment (RAILS_ENV=production). So I checked if the database.yml was missing in the repo, and yes it was.

I currently have two database.yml but a bit different. There's database.yml.development-sample and database.yml.production-sample.

I tried renaming database.yml.production-sample to a simple database.yml but it still doesn't work giving me this error:

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"?

What am I doing wrong ?

Cordially, Rob

PS : The config/redis.yml and public/assets are commented in the .gitignore

Was it helpful?

Solution

@ http://shcatula.wordpress.com/2013/07/08/deploying-discourse-to-heroku/ you have a detailed description of deployment of Discourse to Heroku. It also links to a gist with a shell script that does the entire job of pre-compiling and preparing your deploy. The shell script pretty much explains all the steps needed. Hope it helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top