Skip to content

Instantly share code, notes, and snippets.

@agibralter
Created June 10, 2010 19:14
Show Gist options
  • Save agibralter/433483 to your computer and use it in GitHub Desktop.
Save agibralter/433483 to your computer and use it in GitHub Desktop.
# Using bundler 1.0.0.beta.2 now.
source :gemcutter
gem "rack", "1.1.0"
gem "rails", "2.3.8"
# ...
gem "redis", "2.0.3"
gem "redis-store", "1.0.0.beta2"
# ...
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
config.action_controller.session_store = :redis_session_store
config.action_controller.session = { :servers => ..., :domain => ... }
# I don't know if this is necessary, but it works...
require 'redis-store'
config.cache_store = :redis_store, ["localhost", ...]
end
@hernan43
Copy link

hernan43 commented Jul 7, 2010

Were you ever able to figure this one out?

@agibralter
Copy link
Author

I've updated the gist to reflect what I've been able to get working. I don't remember exactly what I did, but it works now. Please note I'm using bundler 1.0.0.beta.2. Also, I'm not sure if that require is necessary... but I definitely have it after the session store, before the cache store.

@hernan43
Copy link

hernan43 commented Jul 8, 2010

Thanks for the response. I've tried all kinds of stuff but I still get the "undefined method `new' for RedisStore:Module". Blah!

@agibralter
Copy link
Author

Are you using all the same versions as I am?

@hernan43
Copy link

hernan43 commented Jul 8, 2010

I'm using the same versions of everything except bundler. I am using the latest stable release of bundler. I am going to try using the 1.x beta of bundler but I wanna double check that it isn't gonna break anything.

@jodosha
Copy link

jodosha commented Jul 8, 2010

Fixed in http://github.com/jodosha/redis-store/commit/c4d09cc376fe070941835489fc8549fd40fddb28, but not included in the beta2, i'm planning to fix few issues and release a beta3 in this weekend.

For now, just clone and build the gem against the HEAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment