small medium large xlarge

Generic-user-small
18 Jan 2017, 20:17
fredrik robinsson (3 posts)

I have trouble with ruby.png I checked if I could use another picture jpeg but it it didnt work either. Is it a question of paths? gosu is installed but I dont really know where it is. I have something called “start commander with ruby” from previous ruby experiences.

Mark_pragsmall
19 Jan 2017, 02:59
Mark Sobkowicz (17 posts)

Did you go through the Windows setup in the first chapter? You need to install the Developer Tools and the gosu gem in addition to having Ruby.

Generic-user-small
19 Jan 2017, 15:12
fredrik robinsson (3 posts)

I did. The gems from the command prompt and devkit from the site.

Mark_pragsmall
19 Jan 2017, 21:26
Mark Sobkowicz (17 posts)

What do you mean you have trouble with ruby.png? Do you get an error when you run your program? Or does the program run but you don’t see the image in the window? If you get an error, what does it say?

Generic-user-small
21 Jan 2017, 20:41
fredrik robinsson (3 posts)

When I run the program in page17 I get the black screen with the self caption text. When I run the program with addition from page 20 I get a long error message (I try to run the program from sublime 3 with ctrl b:

C:/Ruby22/lib/ruby/gems/2.2.0/gems/gosu-0.11.0-x86-mingw32/lib/gosu/patches.rb:52:in initialize': While opening ruby.png, the following error occured: Det går inte att hitta filen (translation: file cannot be found). (RuntimeError) from C:/Ruby22/lib/ruby/gems/2.2.0/gems/gosu-0.11.0-x86-mingw32/lib/gosu/patches.rb:52:in initialize’ from C:/Users/fredrik/Desktop/Games/WhackARuby/WhackARuby_1/whack_a_ruby.rb:7:in new' from C:/Users/fredrik/Desktop/Games/WhackARuby/WhackARuby_1/whack_a_ruby.rb:7:in initialize’ from C:/Users/fredrik/Desktop/Games/WhackARuby/WhackARuby_1/whack_a_ruby.rb:11:in new' from C:/Users/fredrik/Desktop/Games/WhackARuby/WhackARuby_1/whack_a_ruby.rb:11:in ' [Finished in 1.1s]

Mark_pragsmall
21 Jan 2017, 21:07
Mark Sobkowicz (17 posts)

Is the file ‘ruby.png’ in the WhackARuby_1 folder?

Generic-user-small
15 Jun 2017, 22:21
Pooya Afifian (1 post)

So, I was having the same problem as the original poster so I looked at the files. Not surprisingly, there are ruby and hammer pngs in all WhackARuby_x files as well as in the _starter file. I copied the two image files into the WhackARuby file the book, as I see it, instructs you to make inside the Games folder.

In other words the path name of the file the ruby and hammer are in is: D: Games\WhackARuby ——By the way the whack_a _ruby.rb that I made is also in the D: Games\WhackARuby folder.

Anyway, It worked. Hooray!

You must be logged in to comment