When I try to run my file
$ ruby file.rb
I get
file.rb:5:in `<main>': undefined local variable or method `str' for main:Object (NameError)
The file doesn’t seem to recognize str.scan. My line is
@file_split = str.scan(/ \+\d{11} /)
I’m missing something that I should require?
Fixed: I was missing the variable name!
strvariable should be initialized in thefile.rb. For example like that:and then do you thing