I'm working through the learn game programming book by pragmatic programmers and I can't even manage to get the sample code running. I've dowloaded and when I try to run it, I see the following....
❯ ruby WhackARuby/WhackARuby_1/whack_a_ruby.rb
/Users/noahclark/.rvm/gems/ruby-2.2.3@beancounter/gems/gosu-0.10.4/lib/gosu/patches.rb:40:in initialize': Cannot open file ruby.png (RuntimeError)
from /Users/noahclark/.rvm/gems/ruby-2.2.3@beancounter/gems/gosu-0.10.4/lib/gosu/patches.rb:40:in
initialize'
from WhackARuby/WhackARuby_1/whack_a_ruby.rb:15:in new'
from WhackARuby/WhackARuby_1/whack_a_ruby.rb:15:in
initialize'
from WhackARuby/WhackARuby_1/whack_a_ruby.rb:70:in new'
from WhackARuby/WhackARuby_1/whack_a_ruby.rb:70:in
<main>'
This is the offending line: @image = Gosu::Image.new('ruby.png')
And I tried changing it to @image = Gosu::Image.new('./ruby.png') but that didn't help. Any thought son what might be causing this?
Loading...