Last Updated: February 25, 2016
·
1.83K
· titas9x

Rails easy delayed job with sidekiq

brew update
brew install redis

Start Redis Server

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

If server does not start you can check it

brew info redis

Now in Rails Gemfile

gem 'sidekiq'

Install and run sidekiq

bundle install
bundle exec sidekiq

Change your controller like this

UserMailer.signup_confirmation(user).deliver  #old 
UserMailer.delay.signup_confirmation(user)    #new