From: Ned Konz Date: 2002-07-03T21:55:12+09:00 Subject: Re: Running Curl inside Ruby using Command Expansion 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