# RoR production app does not refresh

**URL:** <https://www.ruby-forum.com/t/ror-production-app-does-not-refresh/99557>\
**Category:** Rails\
**Created:** [January 31, 2006, 10:48pm UTC](https://www.ruby-forum.com/t/ror-production-app-does-not-refresh/99557 "2006-01-31T22:48:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkhumri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@mkhumri](https://www.ruby-forum.com/u/mkhumri)\
**Post date:** [January 31, 2006, 10:48pm UTC](https://www.ruby-forum.com/t/ror-production-app-does-not-refresh/99557/1 "2006-01-31T22:48:12Z")

</div>

Hi,

We have a RoR app deployed using Apache + fastcgi in production mode.  
When we make a change to say a controller filie on the server and go  
back to that page that executes that controller action it takes no  
effect. Does Rails cache pages and if so how does one force the new page  
to be used?

Thanks,

---

<div class="post-metadata">

**Author:** ![mkhumri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@mkhumri](https://www.ruby-forum.com/u/mkhumri)\
**Post date:** [January 31, 2006, 10:57pm UTC](https://www.ruby-forum.com/t/ror-production-app-does-not-refresh/99557/2 "2006-01-31T22:57:14Z")

</div>

rails caches controllers in production. set INITIAL\_ENV=development  
or change the setting in environment.rb that caches controllers

adam

---

<div class="post-metadata">

**Author:** ![mkhumri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@mkhumri](https://www.ruby-forum.com/u/mkhumri)\
**Post date:** [January 31, 2006, 10:57pm UTC](https://www.ruby-forum.com/t/ror-production-app-does-not-refresh/99557/3 "2006-01-31T22:57:14Z")

</div>

sorry i dont think i answered your question. You can reload the  
fastcgi process by running

script/process/reaper -a reload

This will reload all the controller caches.

adam

---

<div class="post-metadata">

**Author:** ![mkhumri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@mkhumri](https://www.ruby-forum.com/u/mkhumri)\
**Post date:** [January 31, 2006, 11:00pm UTC](https://www.ruby-forum.com/t/ror-production-app-does-not-refresh/99557/4 "2006-01-31T23:00:15Z")

</div>

Hi Mufaddal,

In production mode, you must restart the server in order for changes to  
go  
into effect.

Steve  
[http://www.smarkets.net](http://www.smarkets.net)

---

<div class="post-metadata">

**Author:** ![mkhumri](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/258eb7/32.png) [@mkhumri](https://www.ruby-forum.com/u/mkhumri)\
**Post date:** [January 31, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/ror-production-app-does-not-refresh/99557/5 "2006-01-31T23:39:24Z")

</div>

Steve O. wrote:

> In production mode, you must restart the server in order for changes to  
> go into effect.

Not exactly… in production mode you must reload the application code,  
which is  
done using ./script/process/reaper from the root level of your Rails  
application.

Restarting Apache would accomplish a similar effect, but that would  
likely  
orphan whatever FastCGI listeners you had been using. It’s far better to  
just  
restart those processes and leave restarting the web server for when you  
change  
the web server configuration.

Also, if you use SVN for your source control, you could install and  
configure  
Switchtower and use it to both deploy the latest version of your app  
code to the  
production server and automatically bounce the FastCGI listeners…

-Brian
