RailsCasts Pro episodes are now free!

Learn more or hide this

doug's Profile

GitHub User: adeviadoug

Site: www.varsitytutors.com

Comments by doug

Avatar

Ryan,

Are you planning on doing an update for Rails 4 compatibility?

cheers.

d

Avatar

A quick FYI for others that are using engine yard instances. You will want to have redis running on a utility instance and if you follow EY's recommended chef recipe and implementation, add this to your split initializer:

# Load the redis.yml configuration file
redis_config = YAML.load_file(Rails.root + 'config/redis.yml')[Rails.env]

# Connect to Redis using the redis_config host and port
if redis_config
  $redis = Redis.new(:host => redis_config['host'], :port => redis_config['port'])
end

if $redis
Split.redis = $redis
end

Split.configure do |config|
config.db_failover = true # handle redis errors gracefully
config.db_failover_on_db_error = proc{|error| Rails.logger.error(error.message) }
# config.allow_multiple_experiments = true
end