Hi I am making a simple ruby script practiced where I make a form using gets.chomp
and arguments, the problem is that when gets.chomp
use the script returns me an error when I apply the argument test
.
The code:
#!usr/bin/ruby
def formulario(quien)
while (1)
print "[+] Word : "
word = gets.chomp
print quien + " -> " + word
end
end
quien = ARGV[0]
formulario(quien)
The error:
[+] Word : C:/Users/test/test.rb:8:in `gets': No such file or directory @ rb_sysopen - test (Errno::E
NOENT)
from C:/Users/test/test.rb:8:in `gets'
from C:/Users/test/test.rb:8:in `formulario'
from C:/Users/test/test.rb:17:in `<main>'
Can anyone help?