I have configuration data (the host/post for a Redis server) that is managed by a class (RedisConfig) in my RAILS_HOME/lib folder. We decided to use redis-store as our cache.
This is what we have in RAILS_HOME/config/environments/production.rb:
config.cache_store = RedisStore.new "#{RedisConfig.host}:#{RedisConfig.port}"
I, of course, get a TypeError as RedisConfig is loaded AFTER production.rb is loaded, so it never exists in this context. Whats the best strategy for loading and using this configuration manager in our environment.rb or environments/#{RAILS_ENV}.rb files?