I looked around here and could not find a similar example. please help.
My goal is to mv a file like so: mv /tmp/dev.log /usr/local/dev.log.tst
using Ruby 1.8.7
you determined that you needed to use string interpolation for the
variable file, but because ZIPDIR is capitalized, you didn't think
string interpolation was necessary for that variable, and instead you
just wrote the variable next to the string?
···
Am Donnerstag, 13. Aug 2009, 10:48:10 +0900 schrieb Derek Smith:
you determined that you needed to use string interpolation for the
variable file, but because ZIPDIR is capitalized, you didn't think
string interpolation was necessary for that variable, and instead you
just wrote the variable next to the string?
Am Freitag, 14. Aug 2009, 08:46:49 +0900 schrieb Derek Smith:
7stud -- wrote:
> Bertram Scharpf wrote:
>> Am Donnerstag, 13. Aug 2009, 10:48:10 +0900 schrieb Derek Smith:
>>>
>>> FileUtils.mv("#{file}.copied",ZIPDIR"#{file}.tst")
>>
>> Try it with something like (untested)
>>
>> "#{ZIPDIR}/#{file}.tst"
>> File.join ZIPDIR, "#{file}.tst"
>>
>> Syntax errors are the easiest to solve.
>
> ZIPDIR"#{file}.tst"
>
> you determined that you needed to use string interpolation for the
> variable file, but because ZIPDIR is capitalized, you didn't think
> string interpolation was necessary for that variable, and instead you
> just wrote the variable next to the string?