Forums Archived

The forums are being archived. See this topic for more information.

Trouble with Ruby/Rubygame

Get help and support with Rubygame

Trouble with Ruby/Rubygame

Postby CrabCore » Mon Aug 30, 2010 10:06 pm

Hello there, I'm new to Ruby, and Rubygame and semi-new to programming in general. I know some Java but while I was working on a Java project I got really frustrated with it and am taking a break, so I started looking at ruby and a few other languages and ruby definitely stands out to me. The only problem it's not so I guess "use friendly" like Java. Where as java you just download you IDE and java and it's all pretty simple to set up. With ruby though it seems like I'm missing something. I have ruby installed, I can get into the irb, fine and I wrote a few programs on notepad and can get them to run. With gems I download and install the gem but that seems to be the extent of what I can do with it. When I double click to run a ruby file it opens a cmd prompt then closes immediately. The only thing I've got working sort of is redcar and even that won't work for me when I double click it now. Also I don't really understand rubygame, I've downloaded it and I can require 'gems' and 'rubygame' in the irb but I don't really know what that does for me. Does it just provide libraries? Should something be popping up? Any help offered I would really appreciate it. Thanks for your time.
CrabCore
 
Posts: 2
Joined: Mon Aug 30, 2010 9:57 pm

Re: Trouble with Ruby/Rubygame

Postby jacius » Tue Aug 31, 2010 12:27 pm

Welcome, CrabCore. :)

I recommend running your scripts from the command prompt. On Windows, I think you do "cd C:\wherever\your\stuff\is\" then "ruby.exe myscript.rb". Running from the command prompt will let you see error messages from the scripts, which helps a lot in figuring out what's wrong. :lol:

Rubygame only provides a library of classes and functions to use in your applications. But, there are some sample scripts you can use to check whether your installation is working right, and see how Rubygame is used. You can grab the samples from the git repository, or find them in the source package.

By the way: if you haven't done so already, be sure to install Rubygame's dependencies (SDL, etc.) as described in the installation guide.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: Trouble with Ruby/Rubygame

Postby CrabCore » Wed Sep 01, 2010 1:44 am

Hey, thanks for the timely reply! Well I figured our redcar(Iguess some file got lost or something i just reinstalled it), and I'm still having trouble loading the rubygame samples, I do use the command prompt but it just says it's not there... which is really weird. I've already started my project that I had in mind. And I'd love to post it when I get some more work done and get some critiques. Thanks again!
CrabCore
 
Posts: 2
Joined: Mon Aug 30, 2010 9:57 pm

Re: Trouble with Ruby/Rubygame

Postby cavygalaxy » Wed Sep 15, 2010 12:59 am

jacius wrote:Welcome, CrabCore. :)

I recommend running your scripts from the command prompt. On Windows, I think you do "cd C:\wherever\your\stuff\is\" then "ruby.exe myscript.rb". Running from the command prompt will let you see error messages from the scripts, which helps a lot in figuring out what's wrong. :lol:

Rubygame only provides a library of classes and functions to use in your applications. But, there are some sample scripts you can use to check whether your installation is working right, and see how Rubygame is used. You can grab the samples from the git repository, or find them in the source package.

By the way: if you haven't done so already, be sure to install Rubygame'http://rubygame.org/forums/posting.php?mode=quote&f=4&p=603#s dependencies (SDL, etc.) as described in the installation guide.


Awww man, You beat me to the punch! :lol:
Cannibal Troll
A troll that trolls other trolls, thus making the internet a better place
User avatar
cavygalaxy
 
Posts: 18
Joined: Tue Oct 27, 2009 2:35 am


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron