I wanna copy directory listings from removable media to a database so then I’ll know what files are on what removable disk I’m thinking at the system level i have to list the directory to a file and then open the file for reading in ruby and then use the split function to parse each line as I iterate through Before I go ahead and do this is there another way?
You could use one of the shell commands  which will give you back the directory listing direct to your code. No need for an intermediate file.
However, if you google for
ruby directory listing
it will show you much better ways. Usually google will be much quicker for asking such questions than here.