# Webrick / winxp won't stop serving cached file?

**URL:** <https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978>\
**Category:** Rails\
**Created:** [December 23, 2005, 12:14pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978 "2005-12-23T12:14:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 12:14pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/1 "2005-12-23T12:14:57Z")

</div>

Hi

Working through the tut material in teh PP book (agile dev with rails)  
on a laptop running winxp.

Creating the “admin” application, things generally work great. Except:  
at teh end of chapter 6, when we update teh css to improve the look of  
the page - I copy the new scaffold.css into my working directory, but  
webrick keeps serving the old css, even after a restart. Very odd. The  
file at

c:/rails/depot/public/stylesheets/scaffold.css

is definitely different from what I get when I navigate to

[http://127.0.0.1:3000/stylesheets/scaffold.css](http://127.0.0.1:3000/stylesheets/scaffold.css)

(teh webrick was started in c:/rails/depot).

anyone have any idea why? (i bet it would be fine on my linux box at  
home ;-))

thanks!

Daniel

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 1:36pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/2 "2005-12-23T13:36:56Z")

</div>

Daniel,

A few things that come to mind …

- Have you checked in the html source (the page that’s in your browser)  
that  
the META tag actually points to this one?
- Browser caching? (I’ve config’d my browsers with cache disabled so  
that’s  
never the issue, because I’ve seen problems with this in the past)
- A typo (i know that’s never possible … 😉 in:  
app/views/layouts/\*.rhtml

Regards,

Gerard.

On Friday 23 December 2005 12:14, Daniel McBrearty tried to type  
something  
like:

> thanks!
> 
> Daniel

–  
“Who cares if it doesn’t do anything? It was made with our new  
Triple-Iso-Bifurcated-Krypton-Gate-MOS process …”

My $Grtz =~ Gerard;  
~  
:wq!

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 1:55pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/3 "2005-12-23T13:55:02Z")

</div>

thanks Gerard,

I tried a few of those things - closed and restarted teh browser,  
checked the path … the problem didn’t go away until I renamed  
scaffold.css, requested it again (got an error) and then named it back.  
So maybe teh caching is more obstinate than I realised (cached across  
browser instances?)

cheers!

daniel

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 2:40pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/4 "2005-12-23T14:40:19Z")

</div>

Has anyone seen any docs on how to maintain multiple environments on the  
same  
machine? Specifically, I’m wondering how I can maintain a “dev” and a  
“qa”  
environment on the same machine.

I want to be able to have “qa” match the production environment in terms  
of  
which gems and with versions of the gems it has while upgrading the  
gems in the  
dev environment on a different schedule. That way I could, for example,  
keep dev  
up to date with the latest rails gems while not upgrading the qa  
environment  
until I’m testing for a release.

Using Java this is pretty easy in terms of environments - you simply set  
a  
“JAVA\_HOME” which defines the jdk you’re using and then you include  
whichever  
versions of the jar files you need in the classpath for each  
environment.

What’s the Ruby/Rails/Gems equivalent process?

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 3:19pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/5 "2005-12-23T15:19:27Z")

</div>

rake freeze\_gems will import the current version of rails + gems into  
the vendor directory of a rails app.

It’s also possible to use gem to unpack specific versions there.

[http://weblog.textdrive.com/article/180/depending-on-your-vendor-](http://weblog.textdrive.com/article/180/depending-on-your-vendor-)  
directory

cheers,  
David

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 3:10pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/6 "2005-12-23T15:10:22Z")

</div>

Daniel,

Had that before as well, while removing it and putting it back only then  
the  
browser seems to really refresh. Like I said, I’ve seen browsers cache  
even  
when doing an unconditional refresh. So when developing I always disable  
cache, because that completely eliminates the formentioned problem.

Regards,

Gerard.

On Friday 23 December 2005 13:55, Daniel McBrearty tried to type  
something  
like:

> daniel  
> –  
> “Who cares if it doesn’t do anything? It was made with our new  
> Triple-Iso-Bifurcated-Krypton-Gate-MOS process …”

My $Grtz =~ Gerard;  
~  
:wq!

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 3:48pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/7 "2005-12-23T15:48:29Z")

</div>

Hi Gerard

Have you any idea how to do that in firefox? I only see options to clear  
the cache and set its size in “options”.

thanks!

Daniel

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 3:28pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/8 "2005-12-23T15:28:30Z")

</div>

On Fri, 2005-12-23 at 08:38 -0500, Kevin B. wrote:

> until I’m testing for a release.
> 
> Using Java this is pretty easy in terms of environments - you simply set a  
> “JAVA\_HOME” which defines the jdk you’re using and then you include whichever  
> versions of the jar files you need in the classpath for each environment.

[http://docs.rubygems.org/read/chapter/3#page13](http://docs.rubygems.org/read/chapter/3#page13)

GEM\_HOME looks like it can tell ruby to use a specific location for  
gems. You could set it separately for each “environment” in the  
webserver’s exported variables. But you’d need to maintain several gem  
repositories.

Or make use of freeze\_gems and such as David suggested.

-Matthew B.  
removed\_email\_address@domain.invalid :: 607 227 0871  
Resume and Portfolio @ [http://madhatted.com](http://madhatted.com)

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [December 23, 2005, 4:34pm UTC](https://www.ruby-forum.com/t/webrick-winxp-wont-stop-serving-cached-file/50978/9 "2005-12-23T16:34:49Z")

</div>

Daniel,

Set the size to 0 KB.

Regards,

Gerard.

Set theOn Friday 23 December 2005 15:48, Daniel McBrearty tried to type  
something like:

> Hi Gerard
> 
> Have you any idea how to do that in firefox? I only see options to clear  
> the cache and set its size in “options”.
> 
> thanks!
> 
> Daniel

–  
“Who cares if it doesn’t do anything? It was made with our new  
Triple-Iso-Bifurcated-Krypton-Gate-MOS process …”

My $Grtz =~ Gerard;  
~  
:wq!
