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
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:
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)
initialize' from /usr/local/rvm/gems/ruby-2.2.1/gems/gosu-examples-1.0.3/lib/gosu-examples/sidebar.rb:5:innew’
<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)>'
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’
<top (required)>' from /usr/local/rvm/gems/ruby-2.2.1/bin/gosu-examples:23:inload’
<main>' from /usr/local/rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:ineval’