Rails, Passenger and Memcached: Unable to find server during initialization

三世轮回 提交于 2019-12-05 07:17:21

For me it turned out, that my memcache daemon did not listen to 127.0.0.1 but to localhost. After removing the -l localhost option from the init file it worked perfectly. (Default is to listen on all devices.)

I had some similar issues with the memcached gem and switched to dali. Development on dali seems more active and it is significantly faster. I followed the directions on the github page and had dali up and running in about ten minutes.

Just making sure, but I don't see where you're setting the session config to your CACHE constant:

config.action_controller.session = {
  :session_key => '_appname',
  :secret      => 'secret',
  :cache       => CACHE,
  :expires     => 10
}

This might work for qa/dev/testing since I think by default rails looks for the memcached store on localhost. Whereas on production you seem to have a different ip for the memcached server.

In the stacktrace there's 3 lines:

/var/www/oro/production/releases/20100528130253/config/environment.rb   29 
/usr/local//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb   31  in `gem_original_require'  
/usr/local//lib/ruby/site_ruby/1.8/rubygems/custom_require.rb   31  in `require'

It seems to be some gem missing, please review the environment.rb on line 29

did you try?:

sudo gem install memcached

It's memcached running?

sudo /etc/init.d/memcached start
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!