I added memcache-client to our app: config.gem "memcache-client", :version => "1.8.1" According to "gem list" the gem is there: memcache-client (1.8.1) If I run our app with "script/server" everything works just fine but when I try to run it with "mongrel_rails start" it stops with error: no such file to load -- memcache-client So is there something different how mongrel_rails looks up gems? What is so special about this gem as the other gems work just fine? -- Posted via http://www.ruby-forum.com/.
On Wed, Mar 24, 2010 at 7:56 AM, T_ S_ <lists at ruby-forum.com> wrote:> I added memcache-client to our app: > config.gem "memcache-client", :version => "1.8.1" > > According to "gem list" the gem is there: > memcache-client (1.8.1) > > If I run our app with "script/server" everything works just fine but > when I try to run it with "mongrel_rails start" it stops with error: > no such file to load -- memcache-client > > So is there something different how mongrel_rails looks up gems? What is > so special about this gem as the other gems work just fine?When you start mongrel_rails, you''re doing without daemonize, correct? There is no configuration file that indicates mongrel should change user or group when running, correct? It might be that the memcache-client gem is not installed system wide. I''ve used mongrel_rails, combined with memcache-client and memcached in a bundler configuration and worked without issues, so the problem might be something else. Can you build an exact pastie/gist of the output you''re receiving? (or can replicate with a simple rails app?) Thank you -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
I switched from gem "memcache-client" to gem "memcache" and it works without any problems. Both gems are installed in the same way etc. Unfortunately rails when set to use memcache as a session store references to the "memcache-client" so that needs to be included also and I''m back with the original error message. Funny things is of course that it''s not really using that "memcache-client" gem as in an initializer i say CACHE = Memcache.new(:server => "localhost:11211", :namespace => ''web'', :segment_large_values => true) And in session_store.rb ActionController::Base.session = { :key => ''_xxxxx'', :secret => ''xxxxxxx'', :cache => CACHE, :expires => 15.minutes } So the end result is that when I start mongrel with "mongrel_rails start" it complains that "no such file to load -- memcache-client" but the server keeps running and app works as that gem is not really used.> When you start mongrel_rails, you''re doing without daemonize, correct?Yep.> There is no configuration file that indicates mongrel should change > user or group when running, correct?Yep.> It might be that the memcache-client gem is not installed system wide.In my local env I''m using rvm to handle different ruby envs. So the gems are installed to specific ruby env under my home dir, not system wide. But i did try this with system wide installation also and it didn''t help.> Can you build an exact pastie/gist of the output you''re receiving? (or > can replicate with a simple rails app?)Here''s the output: http://pastie.org/931033 -- Posted via http://www.ruby-forum.com/.