Dictionary read error in hangman exercise

I have the following error in the hangman exercise. Seems like its complaining about not being able to find dictionary.txt. I see the error only when running the rspec; If I instantiate the ComputerPlayer class in Pry, I do not see this error and dictionary.txt does get read

with rspec

with Pry w/o RSPEC

My code:


Hi ahmedali,

Take a look at this previous post on Hangman dictionary error and see if it helps: Hangman Solution.


Yes that helped. Thank you