1

I'm trying to run Capistrano 2.15.5 with Whenever 0.8.4 and Ruby 2.0.0

I've added

set :whenever_command, "bundle exec whenever"
require "whenever/capistrano"

to the end of my deploy.rb file and it always run:

/releases/20150910075216 && bundle exec whenever --update-crontab 
app_name --set environment=production --roles db

and fails wth

 No such file or directory - 
/releases/20150910075216/config/database.yml

because database.yml is in folder /shared/ anyways I don't need the db -

how to get rid of --roles db in the capistrano command?

I have

server("my_server", :app, :web, :db, :primary => true)

because I need the :db for other scripts.

Thanks for help!

David

David
  • 825
  • 10
  • 33

1 Answers1

0

You should set linked_files Symlink linked files database.yml as following in deploy.rb for capistrano 3

set :linked_files, fetch(:linked_files, []).push('config/database.yml')

Or you can do Symlink manually for older version.

desc "Make symlink for database yml"
task :symlink do
   run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
end
Rokibul Hasan
  • 4,078
  • 2
  • 19
  • 30