I''ve added this line to switch to mem cache session store config.action_controller.session_store = :mem_cache_store to my environment.rb When trying to start server I''ve got this error => Booting WEBrick => Rails 2.3.2 application starting on http://0.0.0.0:3000 C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/mem_cache_store.rb:20:in `initialize'': #<ActionController::Session::MemCacheStore:0x3516e10> unable to find server during initialization. (RuntimeError) from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:72:in `new'' from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:72:in `build'' from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in `build'' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/inflector.rb:361:in `inject'' from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in `each'' from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in `inject'' from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in `build'' from C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:82:in `initialize'' ... 12 levels... from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84 from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from script/server:3 What should I do? Rails version is 2.3.2, I''m using netbeans 6.5.1. Thanks in advance. -- Posted via http://www.ruby-forum.com/.
On 24 Jun 2009, at 16:51, Fred Smith wrote:> > I''ve added this line to switch to mem cache session store > > config.action_controller.session_store = :mem_cache_store >that sounds like your memcache server isn''t running (at least not on the port etc. it was expecting to find it on) Fred> to my environment.rb > When trying to start server I''ve got this error > > => Booting WEBrick > => Rails 2.3.2 application starting on http://0.0.0.0:3000 > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ > action_controller/session/mem_cache_store.rb:20:in > `initialize'': #<ActionController::Session::MemCacheStore:0x3516e10> > unable to find server during initialization. (RuntimeError) > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ > action_controller/middleware_stack.rb:72:in > `new'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ > action_controller/middleware_stack.rb:72:in > `build'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ > action_controller/middleware_stack.rb:116:in > `build'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > active_support/inflector.rb:361:in > `inject'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ > action_controller/middleware_stack.rb:116:in > `each'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ > action_controller/middleware_stack.rb:116:in > `inject'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ > action_controller/middleware_stack.rb:116:in > `build'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/ > action_controller/dispatcher.rb:82:in > `initialize'' > ... 12 levels... > from > C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84 > from > C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from > C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require'' > from script/server:3 > > What should I do? Rails version is 2.3.2, I''m using netbeans 6.5.1. > Thanks in advance. > -- > Posted via http://www.ruby-forum.com/. > > >
Do you have memcache installed? mem_cache_store uses a memcached server for caching so you will have to start ther server first... On Jun 24, 8:51 am, Fred Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I''ve added this line to switch to mem cache session store > > config.action_controller.session_store = :mem_cache_store > > to my environment.rb > When trying to start server I''ve got this error > > => Booting WEBrick > => Rails 2.3.2 application starting onhttp://0.0.0.0:3000 > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/mem_cache_store.rb:20:in > `initialize'': #<ActionController::Session::MemCacheStore:0x3516e10> > unable to find server during initialization. (RuntimeError) > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:72:in > `new'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:72:in > `build'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in > `build'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/inflector.rb:361:in > `inject'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in > `each'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in > `inject'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in > `build'' > from > C:/Ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:82:in > `initialize'' > ... 12 levels... > from > C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84 > from > C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > from > C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require'' > from script/server:3 > > What should I do? Rails version is 2.3.2, I''m using netbeans 6.5.1. > Thanks in advance. > -- > Posted viahttp://www.ruby-forum.com/.
Thanks, I''ve not know about the server, I thought that mem caching allows to store session in application server memory. How can I do that? I just want to get session stored on application server. Should I use :memory_store? -- Posted via http://www.ruby-forum.com/.