Forum: Ruby on Rails webrick / winxp won't stop serving cached file??

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
88dea4ee78b01aef165e911acf3d9c1c?d=identicon&s=25 Daniel Mcbrearty (danmcb)
on 2005-12-23 12:14
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

(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
4710a8ada2adc162aaee4288d9879d8e?d=identicon&s=25 Gerard (Guest)
on 2005-12-23 13:36
(Received via mailing list)
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!
88dea4ee78b01aef165e911acf3d9c1c?d=identicon&s=25 Daniel Mcbrearty (danmcb)
on 2005-12-23 13:55
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
4cacb94a089bfbf0541db7b9c8081f74?d=identicon&s=25 Kevin Bedell (Guest)
on 2005-12-23 14:40
(Received via mailing list)
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?
4710a8ada2adc162aaee4288d9879d8e?d=identicon&s=25 Gerard (Guest)
on 2005-12-23 15:10
(Received via mailing list)
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!
B0a25b4155c21475cdbf6286fc6d1518?d=identicon&s=25 David Lee (Guest)
on 2005-12-23 15:19
(Received via mailing list)
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-...
directory

cheers,
David
39b36b2be47228f8619d61ea7a607a25?d=identicon&s=25 Matthew Beale (Guest)
on 2005-12-23 15:28
(Received via mailing list)
On Fri, 2005-12-23 at 08:38 -0500, Kevin Bedell 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

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 Beale
mixonic@synitech.com :: 607 227 0871
Resume and Portfolio @ http://madhatted.com
88dea4ee78b01aef165e911acf3d9c1c?d=identicon&s=25 Daniel Mcbrearty (danmcb)
on 2005-12-23 15:48
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
4710a8ada2adc162aaee4288d9879d8e?d=identicon&s=25 Gerard (Guest)
on 2005-12-23 16:34
(Received via mailing list)
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!
This topic is locked and can not be replied to.