Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gosu Installation Error

Tags:

ruby

libgosu

I'm trying to set up the Ruby for kids tutorial, and am completely stuck on the first step. Something with my GOSU GEM instalation is wring. Whenever I try and run the main file as requested I get this error:

internal:lib/rubygems/custom_require:29:in require': no such file to load -- gosu (LoadError) from internal:lib/rubygems/custom_require>:29:in require'

from main.rb:1:in `main'

I have run the $ sudo gem install gosu many times in different locations, upon studying the outcome I've located this:

ERROR:  Error installing gosu:

ERROR: Failed to build gem native extension.

/Users/carlosamengual/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb

The Gosu gem requires some libraries to be installed system-wide. See the following site for a list: https://github.com/jlnr/gosu/wiki/Getting-Started-on-Linux

I'm assuming I'm doing something wrong. I've visited the site it says, but I believe, since it is a ruby project I don't need anything else? Can anyone advise as to how to fix it?

like image 868
user1935300 Avatar asked Feb 13 '26 10:02

user1935300


1 Answers

I had similar issue whilst installing on OS X 10.9.4 although am not sure the version has much to do with it, but ruby version is ruby-2.1.2

To resolve this, I installed these additional dependencies for Gosu which fixed the problem:

brew install sdl2 libogg libvorbis

Then run gem install gosu as usual.

like image 191
Kingsley Ijomah Avatar answered Feb 15 '26 22:02

Kingsley Ijomah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!