Delayed_job does not raise rails environment

This question was followed about delayed_job and monit

His work on my development machine. But whenever I try to start production, it just dies with the following: delayed_job.log

*** Starting job worker delayed_job host:mail.welcometonewnepal.com pid:356
#<Mysql::Error: Access denied for user 'root'@'localhost' (using password: YES)>
*** Starting job worker delayed_job host:mail.welcometonewnepal.com pid:441
#<Mysql::Error: Access denied for user 'root'@'localhost' (using password: YES)>
*** Starting job worker delayed_job host:mail.welcometonewnepal.com pid:448
#<Mysql::Error: Access denied for user 'root'@'localhost' (using password: YES)>

And I'm going to put env into production

ruby script/delayed_job start -e production

And yet this is a mistake. I notice that this is due to the fact that the environment is not configured so that it tries to pick up the development environment.

/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:365:in `read': No such file or directory - /home/millisami/rails_apps/wnn_finale/config/environments/-e.rb (Errno::ENOENT)

Why is the environment setting not set correctly?

+5
source share
4 answers

, script/delayed_job? , "-e" - simply calling script/delayed_job start production , ENV['RAILS_ENV'] ( "development" "production" ) .

- MySQL, .

+3

ruby RAILS_ENV=production script/delayed_job start
+4

script/delayed_job start -- production. , DJ , script/server. delayed_job, , .

EDIT: The gist of the file we are using.

0
source

All Articles