Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Having a problem with Gosu Ruby: undefined methods?
- - By Hyperum Date 2014-04-06 04:37
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?
Parent - By jlnr (dev) Date 2014-04-08 07:22
Looks as if the binary core of Gosu was missing (gosu.bundle). I'm honestly clueless what the Ruby/RVM/Gem people are doing lately. I'm not changing anything and stuff breaks in exciting new ways every day. :)

Can please you try uninstalling and reinstalling the Gosu gem to see if there is anything suspicious in the console output?
Up Topic Gosu / Gosu Exchange / Having a problem with Gosu Ruby: undefined methods?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill