# Rails 2.0.2 mongrel\_rails start Vs ruby script/server fragment\_cache\_store

**URL:** <https://www.ruby-forum.com/t/rails-2-0-2-mongrel-rails-start-vs-ruby-script-server-fragment-cache-store/139142>\
**Category:** Rails\
**Created:** [May 31, 2008, 11:41am UTC](https://www.ruby-forum.com/t/rails-2-0-2-mongrel-rails-start-vs-ruby-script-server-fragment-cache-store/139142 "2008-05-31T11:41:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aditya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/df705f/32.png) [@aditya](https://www.ruby-forum.com/u/aditya)\
**Post date:** [May 31, 2008, 11:41am UTC](https://www.ruby-forum.com/t/rails-2-0-2-mongrel-rails-start-vs-ruby-script-server-fragment-cache-store/139142/1 "2008-05-31T11:41:30Z")

</div>

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
