RailsCasts Pro episodes are now free!

Learn more or hide this

willmoss's Profile

GitHub User: willmoss

Comments by

Avatar

This tutorial needs information about how to configure redis to work with resque, otherwise you're going to get errors.

From: http://hafizbadrie.wordpress.com/2011/03/23/implementing-resqueredis-on-rails-3/

  1. Create redis.yml in config folder :

defaults: &defaults
host: localhost
port: 6379

development:
<<: *defaults

staging:
<<: *defaults

production:
<<: *defaults

  1. Create resque.rb in config/initializers :

Dir[File.join(Rails.root, 'app', 'jobs', '*.rb')].each { |file| require file }
config = YAML::load(File.open("#{Rails.root}/config/redis.yml"))[Rails.env]
Resque.redis = Redis.new(:host => config['host'], :port => config['port'])