This project is archived and is in readonly mode.
[Rails 3] Session option does not pass correctly
Reported by _obj | April 29th, 2010 @ 03:23 PM
I'm trying to switch the session store in Rails 3 by changing
the
config/application.rb as following:
config/application.rb
-----------------------------------
memcache_options = {
:compression => true,
:debug => false,
:namespace => "xx-cache",
:readonly => false,
:urlencode => false
}
CACHE = MemCache.new(memcache_options)
CACHE.servers = ['127.0.0.1:17898']
#check if CACHE is connected and can get value out
#puts CACHE.get('key')
config.action_dispatch.session = {
:key => '_xx_session',
:secret => 'xx',
:cache => CACHE,
:expires => 900
}
config.action_dispatch.session_store = :mem_cache_store
-----------------------------------
Memcache server is running. However, when run "rails s", i got
this
message:
=> Booting WEBrick => Rails 3.0.0.beta3 application starting
in development on http://0.0.0.0:3000 => Call with -d to
detach => Ctrl-C to shutdown server Exiting
/usr/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0.beta3/lib/
action_dispatch/middleware/session/mem_cache_store.rb:19:in
initialize':
#<ActionDispatch::Session::MemCacheStore:0xa302950> unable to
find server during initialization. (RuntimeError)
It seems the session option :cache was not passed correctly.
Comments and changes to this ticket
-
Jeff Kreeftmeijer November 8th, 2010 @ 08:27 AM
- Tag cleared.
- Importance changed from to Low
Automatic cleanup of spam.
-
Santiago Pastorino February 9th, 2011 @ 12:31 AM
- State changed from new to open
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 9th, 2011 @ 12:31 AM
- State changed from open to stale
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>