intercity / chef-repo

Set up your server to host Ruby on Rails apps. - Follow us on Twitter: @intercityup
MIT License
417 stars 84 forks source link

shared/config/database.yml does not exist when deploying #210

Closed achan closed 8 years ago

achan commented 8 years ago

When running bundle exec cap staging deploy:check, I get the following error:

ERROR linked file ~/apps/mcac_staging/shared/config/database.yml does not exist on XXX.XXX.XXX.XXX
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@XXX.XXX.XXX.XXX: exit

Who is responsible for copying the configuration file into the shared directory? Capistrano? Chef?

As a side note, I also needed to change my deploy directory to be located inside my home directory. Deploying to /u/ was giving me errors. Am I missing a step?

berkes commented 8 years ago

What is your Capistrano deploy.rb for this server or stage?

The ~ seems wrong to me.

Amos Chan notifications@github.com schreef op 23 december 2015 22:23:45 CET:

When running bundle exec cap staging deploy:check, I get the following error:

ERROR linked file ~/apps/mcac_staging/shared/config/database.yml does
not exist on XXX.XXX.XXX.XXX
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as
deploy@XXX.XXX.XXX.XXX: exit

Who is responsible for copying the configuration file into the shared directory? Capistrano? Chef?

As a side note, I also needed to change my deploy directory to be located inside my home directory. Deploying to /u/ was giving me errors. Am I missing a step?


Reply to this email directly or view it on GitHub: https://github.com/intercity/chef-repo/issues/210

Sent from my Android device with K-9 Mail. Please excuse my brevity.

achan commented 8 years ago

My deploy rb: https://github.com/openmcac/basechurch/blob/deploy/config/deploy.rb

My staging deploy: https://github.com/openmcac/basechurch/blob/deploy/config/deploy/staging.rb

achan commented 8 years ago

Things are working now. If anyone else runs into this with similar questions, chef-repo's rails recipe will generate the database.yml based on your node and copy it over to your server's shared directory. Captistrano will then link the file into your application's config folder.