From: sto.mar@... Date: 2013-06-19T14:37:09+09:00 Subject: Re: trying to load a .rb file in irb Am 18.06.2013 23:27, schrieb Eric D.: > though, when I try to load a text file from a program in ruby it says > > undefined method `each' for "text.txt":String (NoMethodError). > > > My code looks like this: > > File.open ("text.txt").each {|line| puts line} File.open("text.txt").each {|line| puts line } Never put a space between method name and '('. BTW. When you figure it out by yourself, you should also include the solution in your "Never mind" post. In case other people have a similar problem. --