Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
include core class extensions
Carlos Fernandez
3/27/2007 7:33:00 PM
<newbie>
An internal application, the "manager", will periodically locate a
series of ruby files in a directory structure. The application will
execute each ruby file using backticks (e.g. `ruby myfile.rb`). This
means that a single execution of the manager may end up spinning a
number of separate ruby processes. Although there are clear issues with
this, it is working well enough.
Now we need to include some core class extensions in each ruby process
this application spins up. The files that the manager will run do not
know about the extensions.
I have tried variations of the following interpreter options will no
success (probably user error):
-rlibrary require the library, before executing your script
-Idirectory specify $LOAD_PATH directory (may be used more than
once)
How, can I force each ruby process to "require" these class extensions?
thanks in advance.
Carlos
--
Posted via
http://www.ruby-...
.
2 Answers
Gavin Kistner
3/27/2007 11:17:00 PM
0
On Mar 27, 1:33 pm, Carlos Fernandez <carlos.fernan...@usitc.gov>
wrote:
> I have tried variations of the following interpreter options will no
> success (probably user error):
>
> -rlibrary require the library, before executing your script
> -Idirectory specify $LOAD_PATH directory (may be used more than
> once)
Perhaps a few more details would help. What about them failed? How did
they fail? Where are your libraries installed, or are you only talking
about items in the Standard Library[1]? What values did you use for
directory, and where is your ruby lib installed? What OS are you on?
[1]
http://ruby-doc.o...
Carlos Fernandez
3/28/2007 2:41:00 PM
0
Gavin,
sorry that my question was so vague. between lack of sleep and not
knowing really want to ask I didn't provide enough for you to go on.
I solved my issue last night as soon as put a decent amount of distance
between me and my computer.
I was specifying the "-I" as a relative path, but the rest of the
command: "c:\tools\ruby\bin\ruby.exe . . . " was specified using
absolute paths. At that point, I wasn't even sure what the relative
path, would be relative to? The original process, or the new process.
As soon as i specified "-I" in absolute terms it worked as expected.
One last . . . semi-related question. Is the file specified with the -r
switch, as well as all files specified with "require", considered
relative to a dir on the $LOAD_PATH if it does not start with a '/'?
Carlos
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
include core class extensions
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password