I admit I'm an almost total Ruby / RubyMine newbie, so maybe my expectations are out of whack here, but from what I have read this seems weird, and I could do with some feedback from more knowledgeable folks...
- OS X 10.6.8
- Ruby 1.8.7
- RubyMine 3.1 (and also tried with later versions just in case, right up 4.5)
I'm trying to play around with the Gosu game development library (http://www.libgosu.org/) and so to start with installed the corresponding gem with: sudo gem install gosu
That seems to have worked. I can follow along with their tutorial materials with no bother using vim and the programs I write run just fine. The thing that is puzzling me is that RubyMine doesn't seem to recognize this gem, or perhaps I misunderstand the extent to which it can recognize and offer support (e.g. autocomplete) for a gem.
For example...consider the following code:
class Tutorial < Gosu::Window
super( 640, 480, false )
self.caption = "Gosu Tutorial Game"
@background_image = Gosu::Image.new( self, "media/Space.png", true )
This (and more) will run just fine (both from RubyMine or the command line). But the Gosu in Gosu::Window is underlined and the message when I hover over is "Cannot find Gosu".
Presumably because of this failure to recognize the Gosu::Window the caption in self.caption is underlined with the message upon hovering over of "Cannot find 'caption=' for type 'Tutorial'"
Lastly, when I try and instantiate the new image with Gosu::Image.new( self, "media/Space.png", true ) the Gosu of Gosu::Image is underlined again with a "Cannot find Gosu" message.
The gem is properly "attached" when I go look at Ruby SDK and Gems in Settings. I've tried detaching and reattaching a few times.
So I suppose my main question is, am I wrong to expect it to recognize Gosu, and have an understanding of inherited methods/properties that come from the Tutorial
class extending Gosu::Window
? Should it not be able to autocomplete identifiers from the Gosu library? I kind of imagine it should, but simply cannot seem to get it to do so.
Any explanation or suggestions would be very welcome!