Anyone working with Ruby and Gosu?

ruby

#1

I’m trying to play around with Ruby and Gosu. I have not been successful in getting the Gosu Examples working.

Here is the basic tutorial I’m looking at.

I checked here, and tried to install the dependencies.

Everything seems to work except this:

`sudo apt-get install build-essential libsdl2-dev libsdl2-ttf-dev libpango1.0-dev libgl1-mesa-dev libfreeimage-dev libopenal-dev libsndfile-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘libsndfile1-dev’ instead of 'libsndfile-dev’
build-essential is already the newest version.
libfreeimage-dev is already the newest version.
libopenal-dev is already the newest version.
libsdl2-ttf-dev is already the newest version.
libgl1-mesa-dev is already the newest version.
libpango1.0-dev is already the newest version.
libsndfile1-dev is already the newest version.
libsdl2-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 160 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up udev (204-5ubuntu20.15) …

  • udev requires hotplug support, not started
    …fail!
    invoke-rc.d: initscript udev, action “restart” failed.
    dpkg: error processing package udev (–configure):
    subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
    udev
    E: Sub-process /usr/bin/dpkg returned an error code (1)`

But, gosu was able to install properly along with the gosu-examples.

When I try to run the gosu-examples I get:

$ gosu-examples /usr/local/rvm/gems/ruby-2.2.1@global/gems/gosu-0.10.5/lib/gosu/patches.rb:40:ininitialize’: Could not initialize SDL Video: Failed to connect to the Mir Server (RuntimeError)
from /usr/local/rvm/gems/ruby-2.2.1@global/gems/gosu-0.10.5/lib/gosu/patches.rb:40:in initialize' from /usr/local/rvm/gems/ruby-2.2.1/gems/gosu-examples-1.0.3/lib/gosu-examples/sidebar.rb:5:innew’
from /usr/local/rvm/gems/ruby-2.2.1/gems/gosu-examples-1.0.3/lib/gosu-examples/sidebar.rb:5:in <class:Sidebar>' from /usr/local/rvm/gems/ruby-2.2.1/gems/gosu-examples-1.0.3/lib/gosu-examples/sidebar.rb:1:in<top (required)>'
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in require' from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:inrequire’
from /usr/local/rvm/gems/ruby-2.2.1/gems/gosu-examples-1.0.3/bin/gosu-examples:11:in <top (required)>' from /usr/local/rvm/gems/ruby-2.2.1/bin/gosu-examples:23:inload’
from /usr/local/rvm/gems/ruby-2.2.1/bin/gosu-examples:23:in <main>' from /usr/local/rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:ineval’
from /usr/local/rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in <main>'


#2

Did you resolve that issue?


#3

i am getting these errors now