# FCGI & resetting view cache

**URL:** <https://www.ruby-forum.com/t/fcgi-resetting-view-cache/183596>\
**Category:** Rails\
**Created:** [February 17, 2010, 4:05am UTC](https://www.ruby-forum.com/t/fcgi-resetting-view-cache/183596 "2010-02-17T04:05:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![brent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brent](https://www.ruby-forum.com/u/brent)\
**Post date:** [February 17, 2010, 4:05am UTC](https://www.ruby-forum.com/t/fcgi-resetting-view-cache/183596/1 "2010-02-17T04:05:43Z")

</div>

I’m running my rails app with FCGI. I updated a view and noticed it  
didn’t update the site. Deleted it and it even still shows up. I also  
tried “pkill -9 -f dispatch.fcgi”.

I thought I had done this in the past with controllers and views and  
it updated… How do I reset it to load the new view files?

---

<div class="post-metadata">

**Author:** ![brent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brent](https://www.ruby-forum.com/u/brent)\
**Post date:** [February 18, 2010, 12:12am UTC](https://www.ruby-forum.com/t/fcgi-resetting-view-cache/183596/2 "2010-02-18T00:12:46Z")

</div>

Anyone have any idea?

I just tried to alter a controller too and It’s not taking any of the  
changes. =/

---

<div class="post-metadata">

**Author:** ![brent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brent](https://www.ruby-forum.com/u/brent)\
**Post date:** [February 18, 2010, 1:29am UTC](https://www.ruby-forum.com/t/fcgi-resetting-view-cache/183596/3 "2010-02-18T01:29:51Z")

</div>

Brent wrote:

> I’m running my rails app with FCGI. I updated a view and noticed it  
> didn’t update the site. Deleted it and it even still shows up. I also  
> tried “pkill -9 -f dispatch.fcgi”.
> 
> I thought I had done this in the past with controllers and views and  
> it updated… How do I reset it to load the new view files?

Here is a simple bash script I use to kill all dispatchers:

#!/bin/bash

PRCS=“dispatch.fcgi”  
TMP\_FILE="/tmp/prcss.txt"  
TMP\_FILE2="/tmp/prcss2.txt"

ps -ef |grep “$PRCS” \> $TMP\_FILE  
awk '{ print $2 } ’ $TMP\_FILE \> $TMP\_FILE2

for i in `cat $TMP_FILE2`  
do  
echo “pid: $i”  
kill -9 $i  
done

rm -f $TMP\_FILE $TMP\_FILE2

---

<div class="post-metadata">

**Author:** ![brent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ec9cab/32.png) [@brent](https://www.ruby-forum.com/u/brent)\
**Post date:** [February 18, 2010, 1:31am UTC](https://www.ruby-forum.com/t/fcgi-resetting-view-cache/183596/4 "2010-02-18T01:31:17Z")

</div>

Brent wrote:

> I’m running my rails app with FCGI.

Why on earth are you doing that?

> I updated a view and noticed it  
> didn’t update the site. Deleted it and it even still shows up. I also  
> tried “pkill -9 -f dispatch.fcgi”.
> 
> I thought I had done this in the past with controllers and views and  
> it updated… How do I reset it to load the new view files?

Are you in production mode? If so, there’s probably a caching issue,  
and restarting the server should do the trick.

Also, make sure that there are no backup or merge files around. Various  
editors and version control systems leave files around with names like  
something.rb~ or something.rb.orig , and these can sometimes confuse  
Rails.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
