First add gem 'rufus-scheduler' to your gemfile and $ bundle.
Then create a file in config/initializers called task_scheduler.rb
That's it!