From: Tom Sawyer Date: 2002-07-05T14:17:19+09:00 Subject: Re: Running Curl inside Ruby using Command Expansion your using curl? how do you like it? what's it like? thanks if you've got a moment to anwser. ~transami On Thu, 2002-07-04 at 20:04, comp Rules wrote: > Sorry, > > false alarm. I was writing a curl Config file within > Ruby and forgot to close it before I ran curl. > > Thanks for the help. I also ran strace and it looks > like a cool tool > > Regards > Peter McGregor > > > --- Ned Konz wrote: > On Tuesday > 02 July 2002 10:15 pm, comp Rules wrote: > > > > > I am using the following command inside ruby > > > > > > runCmd = %x{curl --proxy 192.168.0.5:3128 -d > > > userName=aaaa -d password=password -d command=put > > -o > > > ./temp/putOutput.txt -d fileName=abc --config > > > ./temp/tmpDataConfig.txt > > > https://192.168.0.8/RF/RemoteFileAccess} > > > > > > This command fails within ruby but works on the > > > command line{in Linux} > > > > > > Within Ruby Curl tries to open a Config file but > > > silently fails. > > > > > > Is Ruby supposed to allow OS type commands like > > Curl > > > to open their own files? > > > > What's the failure? Does it get any better when you > > pass full > > pathnames for the two files you have in the command > > line? > > > > Why don't you run strace and give us the output: > > > > strace -o ruby.out -f -F -e trace=file,process ruby > > myRubyProgram.rb > > > > Especially look for chdir() calls and failed opens > > of the config > > file... > > > > -- > > Ned Konz > > http://bike-nomad.com > > GPG key ID: BEEA7EFE > > > > > -- ~transami "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin