Basically, I'm really stuck.
I've got this text where I need to do like this: *print prompt file_again = STDIN.gets.chomp() txt_again = File.open(file_again) puts txt_again.read()*
and basically get text from .txt file printed on my console!
Using File.open() directly from irb, but then attempting:
File.open("ex15_sample.txt")
^ I assume it opens but I still end up nowhere. I mean, it's not marked as a variable and I can't print it.
If I'll use:
txt = File.open("ex15_sample.txt")
I'll get some error in the first place, so I can't use print txt later on.
Exercise is from http://ruby.learncodethehardway.org/book/ex15.html and I'm trying to do optional stuff so I don't end up nowhere as with codeschool beginners lesson I did earlier on.