"ruby lib/play_hangman.rb" won't run

I’m in the parent directory and ruby lib/play_hangman.rb doesn’t want to run. I have to go into the lib folder (cd lib) to be able to run my ruby file. Why is that?

When in the parent directory, does
ruby ./lib/play_hangman.rb
work?

Hi, thanks for looking into it! As I tried it again, it does work now…
Originally, it didn’t do anything as if it was in an infinite loop, I had to break out. I only managed to run the ruby file by going into the lib folder. I found it very strange that’s why I asked…
Now, surely I can’t recreate the problem… but thanks anyway!