shell script

V

Vandana

Hi All,

I have a shell script which I use to call a ruby program. I pass
parameters from the shell script to the ruby program

Example:

#!/bin/csh -f

set DEST_DIR=/home/vandana/
ruby test.rb -p $DEST_DIR


----------------------------------

When I execute the above, I get the error "Cannot convert nil to
String. I know that $DEST_DIR is not empty because when I do an echo
$DEST_DIR I see the /home/vandana/

What am I missing here?

----------------------------------------
If I put the command "ruby test.rb -p $DEST_DIR" in quotes I get the
message command not found.


Please help!
Thanks,
 
S

samba

Hi All,

I have a shell script which I use to call a ruby program. I pass
parameters from the shell script to the ruby program

Example:

#!/bin/csh -f

set DEST_DIR=/home/vandana/
ruby test.rb -p $DEST_DIR

----------------------------------

When I execute the above, I get the error "Cannot convert nil to
String. I know that $DEST_DIR is not empty because when I do an echo
$DEST_DIR I see the /home/vandana/

What am I missing here?

----------------------------------------
If I put the command "ruby test.rb -p $DEST_DIR" in quotes I get the
message command not found.

Please help!
Thanks,

try this

ruby test.rb -p `echo $DEST_DIR`
 
V

Vandana

Thanks samba.
I exited from the shell and re logged in..now it works even without
the echo...strange

Thanks a lot.
 
N

Nobuyoshi Nakada

Vandana wrote in [ruby-talk:314963]:
At Mon, 15 Sep 2008 23:32:48 +0900,
If I put the command "ruby test.rb -p $DEST_DIR" in quotes I get the
message command not found.

It's strange.
Don't you have another "ruby" command written in shell script?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top