Dennis: (RUBY) Temp. Verzeichnis für Session-Dateien ändern

Beitrag lesen

Hi Jeena,

Ruby habe ich noch nie programmiert, aber schauen wir doch mal ;-)

CGI::Session

Dort steht:

Public Class methods
    new(request, option={})

request is an instance of the CGI class (see cgi.rb).
  option is a hash of options for initialising this CGI::Session instance.
  [...]
  option is also passed on to the session storage class initialiser;
  see the documentation for each session storage class for the options they support.

Du du keinen spezifischen Storing-Mechanismus wählst, ist also FileStore der Default, auf CGI::Session::FileStore steht:

Public Class methods
    new(session, option={})

option is a hash of options for the initialiser. The following options are recognised:

tmpdir:
    the directory to use for storing the FileStore file. Defaults to Dir::tmpdir
    (generally "/tmp" on Unix systems).

session = CGI::Session.new(CGI.new, )

Und wie genau bist du da jetzt auf die Idee genommen, temp statt tmpdir zu verwenden? ;-)

Viele Grüße,
  ~ Dennis.