Connection refuse when sending mail with cron tab
问题 I'm doing a daily sending email task by using whenever gem. I created a rake task in RAKEFILE name coffee. Here is my task's code: task :coffee => :environment do ReservationBooksNotify.notify.deliver puts "hihi" end When I run this task in console rake coffee , it worked! But when I create a schedule in schedule.rb to automatically sending mail every minute, I get an error hihi rake aborted! Connection refused - connect(2) The error when I trace rake coffee RAILS_ENV=production --trace **