When I run my cap deploy, it complains that it can't access the log file:
Rails Error: Unable to access log file. Please ensure that /var/superduperapp/releases/20120329011558/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
It seems that I have to manually create a log folder. Is there a way to do this with Capistrano so whoever is deploying it doesn't have to remember to create the folder each time they do a new deploy?
These folders should be created by capistrano when you run cap deploy:setup
, have you ran it? To check if everything is fine you can run cap deploy:check
before it.
You can create a custom task to create this directory and launch it as the first task:
task :create_log_share do
run "mkdir -p #{shared_path}/log"
end
before 'deploy:update', :create_log_share
This directory does not need to be created each the time when you deploy. Once is enough. The shared directory never changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With