尝试在schedule.rb中设置环境变量:
# config/schedule.rb: set :chronic_options, :hours24 => true set :output, "log/cron_log.log" env :PATH, ENV['PATH'] env :TRELLO_API_KEY, ENV['TRELLO_API_KEY'] env :TRELLO_CLIENT_SECRET, ENV['TRELLO_CLIENT_SECRET'] every 1.minute do rake "trello:chores", :environment => "development" end