Forum: Ruby exec method adding extra quote at the end of variable

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
609f2c73c880752ed65ce9d42d26121d?d=identicon&s=25 Jon Auman (jonauman)
on 2014-06-25 11:31
Anyone know how I can get around this problem? I am getting an extra
quote at the end of a variable called with the kernel::exec method.

I think the problem is because my variable looks like this:
'file=@#{file}' , where the '@' is a necessary literal in the exec
command.

I have pasted the script and result here: http://pastebin.com/AktDLpNx

Any ideas how to get around this?

Thanks,
Jon
This topic is locked and can not be replied to.