Delayed Job failed: "cannot load translations" from capistrano fetching old files fetching from old releases
Closed this issue · 4 comments
I am using delayed-job gem and capistrano3-delayed-job to manage my jobs while deploying code via capistrano for my Rails 4 application.
The delayed jobs are failing and i'm getting "can not load translations from /home/bot/getsavvy-api/releases/20170419152135/config/locales/devise.en.yml: #<Errno::ENOENT: No such file or directory @ rb_sysopen" error on production after 2-3 days of deployment.
It looks like its fetching files from old releases which are not present on server anymore.
I have following in my deploy.rb file
set :delayed_job_workers, 4 set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'public/system')
Any idea how to resolve this issue?
Are you restarting your workers when you deploy? This is a symptom of a long-running process that is looking for the actual release directory (probably via Rails.root
) rather than the …/releases/current/
symlink.
I am actually using "capistrano3-delayed" gem which restarts the delayed-job workers while deployment.
Do i have to manually restart the delayed-job workers ?
Did you figure out your problem? If not, can you post your capistrano.log
from a recent deploy? (Perhaps as a gist.)
closing this stale issue. (Since we're up to Rails 6 now, I'm guessing Rails 4 solutions wouldn't be too useful anyway.)