M
Michal Suchanek
Hello
I am trying to run some JRuby script and I have to set the CLASSPATH
for my script to work.
I use a launcher locally so I can run the script as
/scripts/mylauncher script.rb
but if I wanted to distribute a sample script this is somewhat troublesome.
I tried to embed the ruby code in a shell script but as Ruby refuses
to read the code from stdin this is not quite nice:
#!/bin/sh
CLASSPATH=<something> jruby -e '
<some code that does not use single quotes>
' "$@"
Note that while this example uses JRuby there might be native
extensions which require specific environment settings and woud have
the same launcher requirements.
If somebody had a better idea for a launcher it would be nice.
Thanks
Michal
I am trying to run some JRuby script and I have to set the CLASSPATH
for my script to work.
I use a launcher locally so I can run the script as
/scripts/mylauncher script.rb
but if I wanted to distribute a sample script this is somewhat troublesome.
I tried to embed the ruby code in a shell script but as Ruby refuses
to read the code from stdin this is not quite nice:
#!/bin/sh
CLASSPATH=<something> jruby -e '
<some code that does not use single quotes>
' "$@"
Note that while this example uses JRuby there might be native
extensions which require specific environment settings and woud have
the same launcher requirements.
If somebody had a better idea for a launcher it would be nice.
Thanks
Michal