T
Tuka Opaleye
Hi,
I have a really wierd issue going on with command line on windows:
I have 2 files
C:\Data\Projects\Ruby\tests>ruby ParseTest.rb source.csv
source.csv
target.au3
C:\Data\Projects\Ruby\tests>ruby StringTest.rb source.csv
StringTest.rb:12: uninitialized constant ARG (NameError)
ParseTest.rb contains:
# Parsing Test - Ruby CB 21.3
#puts 'This program will output the command line arguments word by word'
#ARGV.each {|line| puts line}
puts ARGV[0]
puts ARGV[1]
-----------------------------------------
StringTest.rb contains:
# the first commandline argument is the source file
# the 2nd argument is the target file
puts ARGV[0]
puts ARGV[1]
#Get the arguments and assign as files
sourceFilename = ARGV[0]
targetFilename = ARGV[1]
What is the issue here ? Seems more todo with the environment...
TIA,
Tuka
I have a really wierd issue going on with command line on windows:
I have 2 files
C:\Data\Projects\Ruby\tests>ruby ParseTest.rb source.csv
source.csv
target.au3
C:\Data\Projects\Ruby\tests>ruby StringTest.rb source.csv
StringTest.rb:12: uninitialized constant ARG (NameError)
ParseTest.rb contains:
# Parsing Test - Ruby CB 21.3
#puts 'This program will output the command line arguments word by word'
#ARGV.each {|line| puts line}
puts ARGV[0]
puts ARGV[1]
-----------------------------------------
StringTest.rb contains:
# the first commandline argument is the source file
# the 2nd argument is the target file
puts ARGV[0]
puts ARGV[1]
#Get the arguments and assign as files
sourceFilename = ARGV[0]
targetFilename = ARGV[1]
What is the issue here ? Seems more todo with the environment...
TIA,
Tuka