Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Gosu Exchange / Ubuntu, geany
- - By brotheroflogan Date 2015-03-17 01:08
Can anyone help me with this? I've downloaded and installed gosu (I think) but here is the error I get when attempting to run a "gosu test" program I get this error.

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- gosu (LoadError)
  from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
  from gosutest.rb:2:in `<main>'

For what it's worth, I have downloaded SDL and SDL2 and libImageFree.  I've been to this page and I do not know how to do what they are talking about:  Particularly when it says "untar, go to directory, ./configure, make, sudo make install."
Parent - - By brotheroflogan Date 2015-03-17 01:17
Follow up:

I tried reinstalling gosu and I got this error

ERROR:  Error installing gosu:
  ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
The Gosu gem requires some libraries to be installed system-wide.
See the following site for a list:

checking for TTF_RenderUTF8_Blended() in -lSDL2_ttf... no
checking for FreeImage_ConvertFromRawBits() in -lfreeimage... yes
checking for FreeImage.h... yes
checking for main() in -lopenal... no
creating Makefile

[It went on from here///]
Parent - - By jlnr (dev) Date 2015-03-17 04:41
Well, did you follow the steps for Ubuntu on the Wiki page that is referenced in the error?

You shouldn't have to download Gosu either, gem install gosu does all that for you :) The Ruby version does not require the C++ version to be installed, it is self-contained.
Parent - - By brotheroflogan Date 2015-03-19 03:37

Thank you. Sometimes the obvious needs to be pointed out.

I downloaded those libraries and then gosu and it said 1 gem installed, so I think that error has been resolved.

But when I compile and run, I still get this message:

undefined local variable or method `gosu' for main:Object (NameError)
Parent - - By jlnr (dev) Date 2015-03-19 04:37
Good to hear :)

If you see that error, have you maybe written require gosu instead of require 'gosu'? Or maybe you tried to access gosu::Image instead of Gosu::Image? Ruby is basically complaining that there is no thing called gosu when you are trying to use it.
Parent - By brotheroflogan Date 2015-03-19 14:51
So you have to capitalize Gosu when you use it with something like ::Image or :: window?  I just tried it and it worked.
Thanks for the help.
Up Topic Gosu / Gosu Exchange / Ubuntu, geany

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill