Trying to use gosu right now, and I'm SO fustrated.
Turns out that Mon Oui's ray library for ruby works, but I like Gosu for it's ease of use.
Anyways, I was following a tutorial for gosu ruby.
#code starts here
require 'rubygems' # only necessary in Ruby 1.8
require 'gosu'
class MyWindow < Gosu::Window
def initialize
super(640, 480, false)
self.caption = 'Hello World!'
end
end
window = MyWindow.new
window.show
#code ends here
But I keep getting these 2 errors, randomly alternating between each other:
home:ruby Home$ ruby main.rb
main.rb:12:in show': undefined method
protected_needs_cursor?' for #<MyWindow:0x107c7bef8> (NoMethodError)
from main.rb:12
home:ruby Home$ ruby main.rb
main.rb:12:in show': undefined method
protected_update' for #<MyWindow:0x10d9ec060> (NoMethodError)
from main.rb:12
ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
rvm --version
1.25.22
Anyone know what could be going on?
Loading...