Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Cannot open file ruby.png
- - By noahc Date 2015-12-18 19:32
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?
Parent - By noahc Date 2015-12-18 20:16
Up Topic Gosu / Gosu Exchange / Cannot open file ruby.png

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill