The blog of Rahoul Baruah from 3hv Ltd

What's going on?

My name is Rahoul Baruah (aka Baz) and I'm a software developer in Leeds (England).

This is a log of things I've discovered while writing software in Ruby on Rails. In other words, geek stuff.

However, I've decided to put this blog on ice - I would ask you to check out my business blog here (or subscribe here).

08 December, 2005

Sessions idiocy

I reckon my session weirdness yesterday was entirely down to the fact that I had been running the same application in both production (within IIS) and development (within WEBrick) mode on the same machine.

I've altered my environment files (both production.rb and development.rb) to store their files separately, so at least I get some indication of what is going on. Simply add the line:

ActiveController::CgiRequest::DEFAULT_SESSION_OPTIONS[:tmpdir] = "C:\\Temp\\Ruby\\Dev"

obviously switching Dev for Prod in the alternative case.

I also need to clear out all session files on my drive ...

cd del /s ruby_sess.*

because for some weird reason the interaction between the two environments means that it spews out session files all over the shop - I've found them in C:\Windows\Temp, C:\Temp, C:\Documents and Settings\username and C:\Documents and Settings\username\Local Settings\Temp. The latter one is a hidden folder so Windows Search ignores it by default (which had me stumped for a while).

No comments:

eXTReMe Tracker