From: Hassan Schroeder Date: 2010-10-23T22:42:32+09:00 Subject: Re: Non-Hard Coded File.open(newFile) On Sat, Oct 23, 2010 at 6:35 AM, Grant Curell wrote: > Like a lot of people I'm new to Ruby and I'm trying to do something I > thought would be pretty simple. I want the user to give me input in the > form of a filename and then subsequently open the file. Here is what I > have so far: >  def initialize() >    @fileToParse = fileToParse #I get user input in the form of gets in >                               #another class. Are you removing the newline at the end of the string from `gets` ? > F:/Programming/eclipseWorkspace/CSE_655/file_handler.rb:8:in > `initialize': Invalid argument - C:/Users/grant/Desktop/test.txt Probably actually "C:/Users/grant/Desktop/test.txt\n" right here ^ > (Errno::EINVAL) HTH, -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com twitter: @hassan