Beware of Mozilla + Rails

Hi all,

In re-doing the very first Hello World in the Agile Rails WEb Dev book,
I
continuously got blank pages, no matter what URL I put in, except when I
put
http://localhost:3000/

After eliminating everything else, I switched from Mozilla to Konqueror,
and
the symptom went away. I tried clearing cache on Mozilla, but that
didn’t
bring it back. I copied and pasted the URL from Konqueror to Mozilla to
make
sure I hadn’t made a mistake on the URL.

The exercise had worked perfectly on Mozilla yesterday, so it’s
intermittent.

Beware of Mozilla + Rails.

SteveT

Steve L.
Author:

Steve L. wrote:

Hi all,

In re-doing the very first Hello World in the Agile Rails WEb Dev book,
I
continuously got blank pages, no matter what URL I put in, except when I
put
http://localhost:3000/

I too had the same problem with Firefox. It was bizarre, but it went
away when I closed all Firefox windows and started again.

Remove your cookies. And be sure to clear out the sessions in /tmp.

Joe Van D. wrote:

Remove your cookies. And be sure to clear out the sessions in /tmp.

Yep, this fixed it properly for me. Thanks!

On Friday 06 January 2006 10:11 pm, Edward OG wrote:

Joe Van D. wrote:

Remove your cookies. And be sure to clear out the sessions in /tmp.

Yep, this fixed it properly for me. Thanks!

Yes, the minute I removed all cookies in Mozilla the problem vanished.

But this brings up a bigger problem. Mozilla + Firefox have a
significant
market share – not one I’m willing to blow off.

If my visitors see a blank screen, with no explanation, nor even a way
to
email me, that’s very bad for business.

We need to figure out whether this “blank screen of death” is caused by
aberant application programming, in which case we must identify the
circumstances that cause it, or a defect in Rails, in which case that
needs
to be fixed.

Thanks

SteveT

Steve L.
Author:

(Legal Disclaimer) Follow these suggestions at your own risk.

On Jan 7, 2006, at 8:39 AM, Justin F. wrote:

vanished.
Steve L.
misconfiguration, or, as you have discovered, because of having old
session data which is incompatible with a new or changed
application. The core team is aware of the need to improve this
wherever possible.

For now, developers have to be aware of the need to clear out stale
session data. Before long I would expect Rails to be a bit more
robust, e.g. by logging the error and discarding the old session.

This was nothing to do with your choice of browser.

Agreed. This happens in Safari as well.

regards

Justin


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Bob H. – blogs at <http://www.recursive.ca/
hutch/>
Recursive Design Inc. – http://www.recursive.ca/
Raconteur – http://www.raconteur.info/
xampl for Ruby – http://rubyforge.org/projects/xampl/

On Saturday 07 January 2006 08:39 am, Justin F. wrote:

Steve, there are some circumstances in which Rails fails without giving
meaningful diagnostic information - either relating to misconfiguration,
or, as you have discovered, because of having old session data which is
incompatible with a new or changed application. The core team is aware
of the need to improve this wherever possible.

For now, developers have to be aware of the need to clear out stale
session data.

Thanks Justin!

How would I clear out stale session data? I want to make sure my
visitors
never see the white screen of death. Also, clearing old session data
sounds
like a good security move.

Thanks

SteveT

Steve L.
Author:

Steve L. wrote:

(Legal Disclaimer) Follow these suggestions at your own risk.

Steve, there are some circumstances in which Rails fails without giving
meaningful diagnostic information - either relating to misconfiguration,
or, as you have discovered, because of having old session data which is
incompatible with a new or changed application. The core team is aware
of the need to improve this wherever possible.

For now, developers have to be aware of the need to clear out stale
session data. Before long I would expect Rails to be a bit more robust,
e.g. by logging the error and discarding the old session.

This was nothing to do with your choice of browser.

regards

Justin

On 1/7/06, Steve L. [email protected] wrote:

Thanks Justin!

How would I clear out stale session data? I want to make sure my visitors
never see the white screen of death. Also, clearing old session data sounds
like a good security move.

Remove the ruby session files in /tmp.

This is only a problem (I believe) when you’re doing active
development on the site. Everytime that you change classes that are
in the session (i.e. the User class), you should remove the old
sessions before deploying the site.

Joe

Steve L. wrote:

session data.

Thanks Justin!

How would I clear out stale session data? I want to make sure my visitors
never see the white screen of death. Also, clearing old session data sounds
like a good security move.

As Joe van Dyk pointed out, things will only break if you change the
application, making it incompatible with existing session data. But you
shouldn’t allow session data to accumulate indefinitely - see the bit
about “Clearing out Sessions” in Agile Web D. with Rails (in
section 22.4).

regards

Justin

On 07/01/06, Steve L. [email protected] wrote:

How would I clear out stale session data? I want to make sure my visitors
never see the white screen of death. Also, clearing old session data sounds
like a good security move.

it depends where you keep them. If it’s in the filesystem (by default)
just write
a cron job to delete session files older than N days.


Rasputin :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/

On Sunday 08 January 2006 03:31 am, Justin F. wrote:

As Joe van Dyk pointed out, things will only break if you change the
application, making it incompatible with existing session data. But you
shouldn’t allow session data to accumulate indefinitely - see the bit
about “Clearing out Sessions” in Agile Web D. with Rails (in
section 22.4).

regards

Justin

Thanks Justin!

You were absolutely right, as was the book.

Everyone: If you’re following this thread or reading “Agile Web
Development
With Rails”, be aware that session data MIGHT NOT be kept in the /tmp
directory.

I’ve built my applications at /home/slitt/tcrails/appname, and my
session data
is contained in /home/slitt/tmp, so be aware. I guess my app is running
as
user slitt or something like that.

For my own personal understanding, I’d like to be able to manipulate the
session file with a text editor, but so far, every time I’ve tried it’s
produced the “dreaded blank screen”, necessitating deletion of the file.
Does
anyone know the binary structure of these files? I clearly see my f1 and
f2
keys in there, but cannot find a way to manipulate their values.

Anyone have an idea for a good binary editor to use on these things?
Once
again, I’m doing this for the sake of understanding – I’m not a mad
scientist about to include self-modifying code in his Rails app :slight_smile:

Thanks

SteveT