App Academy

Ruby Basic Cursor Input Exercise

I’m having trouble getting the Basic Cursor Input exercise to work within the Object-Oriented Ruby Section. Curious if other people are having the same issue. I have windows and am using Visual Studio code as my IDE.

The instructions are pretty brief, but are we supposed to clone the repository and edit the code or should the code work from the beginning?

Lines of code:
ensure
STDIN.echo = true
STDIN.cooked!
return input
end

Error:
Traceback (most recent call last):
5: from lib/game.rb:22:in <main>' 4: from lib/game.rb:14:in run’
3: from C:/Users/litel/OneDrive/Desktop/Coding/ruby-cursor-game/lib/player.rb:12:in move' 2: from C:/Users/litel/OneDrive/Desktop/Coding/ruby-cursor-game/lib/cursorable.rb:35:in get_input’
1: from C:/Users/litel/OneDrive/Desktop/Coding/ruby-cursor-game/lib/cursorable.rb:63:in read_char' C:/Users/litel/OneDrive/Desktop/Coding/ruby-cursor-game/lib/cursorable.rb:63:in echo=’: Invalid argument (Errno::EINVAL)