Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Weird Issue with Installing Ruby / Gosu / Chingu on Windows
- - By ml Date 2013-11-04 06:56
I've installed Ruby and Gosu and Chingu on numerous Windows systems without any real trouble. Today I did the same procedure as always, but for some reason it didn't work. I'm getting a strange error which I've never encountered before, and unfortunately it sounds like people who are trying out StickBall on the GameDev.net PUTT Contest are running into the same problem. I tried out several different Chingu-based games, which had previously have worked in the same situation, and I got the same results - a problem loading basic images:

C:/games/StickBall/rb/lense_flare.rb:85:in new': allocator undefined for
Gosu::Image (TypeError)
        from C:/games/StickBall/rb/lense_flare.rb:85:in
load_images'
        from C:/games/StickBall/rb/lense_flares.rb:36:in load_images'
        from C:/games/StickBall/rb/beginning.rb:24:in
initialize'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/chingu-0.8.1/lib/chingu/game_st
ate_manager.rb:300:in `new'

I am perplexed as to why this is happening, when previously I have performed the same install with no difficulty whatsoever. I tried with different versions of Gosu and Chingu, and it didn't seem to make a difference, although I did not exhaust all the possible gem version combinations. Is there a preferred, most-stable, Gosu version X, Chingu version Y combination which might improve the odds of success?

Here is a screenshot which was sent to me by one of the other contestants in the PUTT challenge, reflecting the same issue:



Any thoughts as to what might be causing this?
Parent - - By Spooner Date 2013-11-04 18:09
Really, except for hardcore Ruby devs, you want to be distributing it as exe/.app, because otherwise dependencies will always be a pain. No idea what the issue is though.
Parent - - By RavensKrag Date 2013-11-05 16:37
Is this true even if you use Bundler?
(I'm assuming the user has Bundler installed already, which I know is a bit of stretch.)
Parent - - By Spooner Date 2013-11-05 19:38
I mean it is more of a stretch to get a non ruby dev to install an app + dev kit + "gem install bundler" + "bundle install". Too many steps to go wrong there (and yeah, some people will manage that OK, but much easier for you to do a build for them).
Parent - By ml Date 2013-11-05 20:54 Edited 2013-11-05 21:52
I found out the hard way that the Windows Ruby Installer does not automatically install bundler. "gem install bundler" is not too complicated. The dev kit is a little bit of a bigger obstacle though. Personally, I think it's time for me to take another run at learning to use Releasy and Rake.

While I'm at it I'm going to try to find out what all is entailed in compiling a game for iPhone/iPad......... sounds like it's possible in C++ but pretty tough with Ruby.......
Parent - By RavensKrag Date 2013-11-07 00:46
Can't speak for OSX ,but automating these things on Ubuntu as well as Windows isn't a big deal at all.  That should solve the problem of user error / extra hassle of installation, without making the user install multiple Ruby interpreter setups for different Ruby games. (Not like there are a ton of those right now, but still...)

You can easily run gem install bundler and bundle install through a script. Or even go as far as to install ruby though apt-get (Ubuntu) or the rubyinstaller.org package (Windows).

Could probably automate the devkit install too, but I haven't looked in to that yet.

(I should really pack this up into a nice package so it's easy to deploy games this way, if people want to...)

Still, I don't think it's too much to ask the user to just install the Ruby interpreter, especially on Windows.  Minecraft runs on Java, so you'd have to install Java to play it.  I don't consider that a big deal, though maybe other people would disagree?

At that point, you'd only have to distribute pre-compiled Windows gems for key libraries (but many Ruby gems are pre-compiled for Windows deployment anyway, so that should be minimal effort).
Parent - - By jlnr (dev) Date 2013-11-05 19:56
Sorry, this is a bug in the current Windows version of Gosu. You will need to use 0.7.48 for now. I'm in a hostel and running out of battery, otherwise I'd fix the issue immediately.
Parent - By ml Date 2013-11-05 20:43 Edited 2013-11-06 15:08
Thanks good to know. I'll try it out again with 0.7.48.  EDIT: everything appears to work fine as usual with 0.7.48.
Up Topic Gosu / Gosu Exchange / Weird Issue with Installing Ruby / Gosu / Chingu on Windows

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill