Search code examples
ruby-on-railsenvironment-variablesdelayed-job

delayed_job not seeing environment variables


The Rails 4 application is deployed to the production server using Capistrano 3. The delayed jobs daemon starts. When a job is created, it does not recognize environment variables set in /etc/profile using ENV (returns nil). Any thoughts?


Solution

  • Moved the environment variables from /etc/profile to /etc/environment and that seemed to have fixed the problem. Maybe that's the way I was supposed to do it in the first place...I'm not a Linux expert.