Closed lexastudio closed 13 years ago
I'm stuck at this part, too. Mac OS X.6.5, Chrome 10.0.612.3 dev. Here's my input/output:
>> def load_comics( path )
.. comics = {}
.. File.foreach(path) do |line|
.. name, url = line.split(': ')
NameError: undefined local variable or method `line' for main:Object
>> def load_comics( path )
.. comics = {}
.. File.foreach(path) do |line|
.. name, url = line.split(': ')
.. comics[name] = url.strip
NoMethodError: undefined method `strip' for nil:NilClass
There was more before this, but I think you get the idea between this and the original poster's findings as well.
After trying this lesson three or four times, I couldn't get it to work. Then, naturally, after posting the above comment on this issue, it seemed to resolve itself and work the first time I tried again. D:
I'm having the same issue.
NoMethodError: undefined method strip' for nil:NilClass or NameError: undefined local variable or method
line' for main:Object
Tried in both Firefox and Chrome on Mac OSX
Any tips?
Hi,
Here is what I faced during that lesson:
Please notice this error message, which is before the last one:
NoMethodError: undefined method `times' for "Scott":String
I did not enter "times" or "Scott" at all in this session. I guess there is a problem with mixing different working scopes among sessions.
Anyway, thanks for such a great tutorial!
Lexastudio