我的config/schedule.rb文件看起來像這樣:每當寶石environment_variable沒有被設置
LOG_FILE = File.expand_path("#{__FILE__}/../../log/Scripts.log")
set :environment_variable, 'BACKEND_ENV'
set :environment, :production_backend
set :output, LOG_FILE
every 1.day, :at => '1:00 am' do
rake "my_task"
end
當我運行時,output
和environment
設置正確,但environment_variable
仍然默認爲RAILS_ENV:
[email protected]_box:~$ whenever
0 1 * * * /bin/bash -l -c 'cd /home/me && RAILS_ENV=staging bundle exec rake my_task --silent >> /home/me/log/Scripts.log 2>&1'
## [message] Above is your schedule file converted to cron syntax; your crontab file was not updated.
documentation很清楚......我做錯了什麼?