Line breaks changing meaning?

I’m having the bizarre situation where line breaks appear to be changing
meaning. If run from the command line, the resulting line runs fine.
If run in the console (as www), the program works fine, but when run in
the webapp, the program does something weird. I’m not sure what it is
sending to the JobCreator program, but I’ll probablly replace it with a
script that dumps args to see what’s up if it keeps annoying me. There
are two system commands. The second one works fine, even with the
breaks. The first one does not. It’s put into a string so that I can
dump it to flash[:notice], but whether it is in a variable does not
change the results.

What frustrates me the most is that different results come from the ruby
console. I’m at a bit of a loss as to how to debug the problem, so, for
now, I’ve just clumped it back into one huge ugly line.

I’m considering things like putting it into a string with breaks and
then stripping whitespace, but that seems like a huge hack.

frame_to_render = @job.last_frame_to_render / 2 +

@job.first_frame_to_render / 2
jcCommand = “#{Config.paths[‘bin’]}/JobCreator -V #{@job.version} -e
#{@job.username}@mcad.edu #{@job.renderer == “HW” ? “-h” : “-s”} -f 1
-F #{frame_to_render} -n “#{@job.id} #{@job.username} proof” -I
#{Config.paths[‘bin’]}/studio.sh -O
#{Config.paths[‘working’]}/#{@job.id}/proof.plist #{@job.id} 1”
system jcCommand
system “#{Config.paths[‘bin’]}/JobCreator
-V #{@job.version}
-e #{@job.username}@mcad.edu
#{@job.renderer == “HW” ? “-h” : “-s”}
-f #{@job.number_of_frames_per_task}
-F #{@job.first_frame_to_render}
-n “#{@job.id} #{@job.username} final”
-I #{Config.paths[‘bin’]}/studio.sh
-O #{Config.paths[‘working’]}/#{@job.id}/final.plist
#{@job.id}
#{@job.last_frame_to_render}”

On Jan 18, 2007, at 5:19 PM, Jonathan D. wrote:

I’m having the bizarre situation where line breaks appear to be
changing
meaning. If run from the command line, the resulting line runs fine.
If run in the console (as www), the program works fine, but when
run in
the webapp, the program does something weird.

Would you please extract the issue into a minimal example?

– fxn

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs