After more than two years, I’m looking at mod_ruby again.
I’m trying to figure out what the consequences are of all the scripts
being run with a single interpreter.
For example, if a script does: require 'foo’
will that remain in effect for subsequent scripts?
What about constants, global variables, changes to open classes?
Yes, I’m re-reading the docs.
Point out to me anything I might
be missing, please.
Thanks,
Hal
Hal Fulton wrote:
After more than two years, I’m looking at mod_ruby again.
I’m trying to figure out what the consequences are of all the scripts
being run with a single interpreter.
It can be a bummer. And hellishly difficult to identify the cause of issues.
For example, if a script does: require ‘foo’
will that remain in effect for subsequent scripts?
Yes. In development you will want to load ‘foo’ to restart the file
every time. mod_ruby caches required files.
I ran into the situation where i was loading cgi/session but was getting
a different version from a person who was sharing the virtual host. So
you might want to qualify your path. All of them. So instead of require
‘cgi’ require ‘/path/to/current/ruby/cgi’
What about constants, global variables, changes to open classes?
I’ve not run into any problems with that - but i’m doing the above.
Yes, I’m re-reading the docs.
Point out to me anything I might
be missing, please.
Thanks,
Hal
I’m setting up an account on a host that provides a virtual machine for
each host(or a number of them), which hopefully, will negate some/all of
these things.
hub.org
Give me a bit to flesh this out some tho, i’ve not been overly happy
with the service(they have not set up mod ruby before, it seems) but
i’ll let you know.
:paul
http://www.fastcgi.com/
http://raa.ruby-lang.org/list.rhtml?name=fcgi

-a
···
On Fri, 7 May 2004, Hal Fulton wrote:
Yes, I’m re-reading the docs.
Point out to me anything I might be
missing, please.
–
EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
URL :: Solar-Terrestrial Physics Data | NCEI
TRY :: for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done
===============================================================================
Paul Vudmaska wrote:
Hal Fulton wrote:
After more than two years, I’m looking at mod_ruby again.
I’m trying to figure out what the consequences are of all the scripts
being run with a single interpreter.
It can be a bummer. And hellishly difficult to identify the cause of
issues.
Why is it doesn’t clear what is in memory? I mean you could just
totally clobber the vtable and it wouldn’t matter, it’s not like garbage
collection where some stuff has to live. It would seem to me there is a
way to run through a script and keep the interpreter running without
littering your namespace with all sorts of crap from the previous run
through.
Charles Comstock