Aditya
2008-May-31 09:40 UTC
Rails 2.0.2 mongrel_rails start Vs ruby script/server fragment_cache_store
Hi Guys, We found that when we use ruby script/server start, the fragment_cache_store always seems to default to :file_store. (because tmp/cache dir gets created automatically lib/commands/server.rb) If however we use mongrel_start then of course the tmp/cache folder doesn''t get created and the fragment_cache_store defaults to :memory_store. If of course we use mongrel_rails and the tmp/cache folder exists, it defaults to :file_store. It seems this problem has been fixed in Rails 2.1. In Rails 2.1 it would never default to file_store unless explicitly put in configuration. The lesson learnt is to explicitly put the ActionController::Base.cache_store = :file_store, "/tmp/cache" (for Rails2.1) and ActionController::Base.fragment_cache_store = :file_store, "/tmp/cache" in your environment file. Additionally, check in your tmp/cache folder in your source control folder and dont rely on the start up command to create those folders for you. I wish we knew about this before. Anyway, since I don''t have an active blog, putting this here might someone else later. Cheers, Aditya --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---