Before I explain the issue I’m having I should preface it with some
important information. I’m a novice programmer at best and I’m new to
Ruby…
I’m trying to capture the authentication token from Nessus so I can use
it to run scans, reports, etc. I found the following code on the Nessus
site but I’m getting “undefined method `each' for
#<String:0x00000001458a10> (NoMethodError)” from a line of code near the
bottom (response.body.each do |line|). I’m using Ruby 1.9.1 running on
Linux (Ubuntu 10.04). Any insight you can provide would be much
appreciated!
Before I explain the issue I’m having I should preface it with some
important information. I’m a novice programmer at best and I’m new to
Ruby…
I’m trying to capture the authentication token from Nessus so I can use
it to run scans, reports, etc. I found the following code on the Nessus
site but I’m getting “undefined method `each' for
#<String:0x00000001458a10> (NoMethodError)” from a line of code near the
bottom (response.body.each do |line|). I’m using Ruby 1.9.1 running on
Linux (Ubuntu 10.04). Any insight you can provide would be much
appreciated!
ruby 1.8 had String#each, ruby 1.9 does not. Use String#each_line
instead.
Before I explain the issue I’m having I should preface it with some
important information. I’m a novice programmer at best and I’m new to
Ruby…
I’m trying to capture the authentication token from Nessus so I can use
it to run scans, reports, etc. I found the following code on the Nessus
site but I’m getting “undefined method `each' for
#<String:0x00000001458a10> (NoMethodError)” from a line of code near the
bottom (response.body.each do |line|). I’m using Ruby 1.9.1 running on
Linux (Ubuntu 10.04). Any insight you can provide would be much
appreciated!
Hi
It seem that the method "each" in String has been removed from version
1.9.*,you can see the build-in method declaration in string.c: