Forums Archived

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

Installing RubyGame on Mac

Get help and support with Rubygame

Installing RubyGame on Mac

Postby JRJurman » Tue Jul 27, 2010 10:39 pm

I have been writing in ruby for over a year now, and after having difficulty with previous sound toolkits, I wanted to try rubygame.

I used the Ruby game mac pack, and despite using a one click installer to re-download ruby, it almost worked perfectly, however when I run any rubygame file I get an error from terminal:

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- rubygame (LoadError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'

I have no idea what to do, and have already looked at the forums for similar problems, but have found no solutions...
User avatar
JRJurman
 
Posts: 8
Joined: Tue Jul 27, 2010 10:30 pm

Re: Installing RubyGame on Mac

Postby jacius » Fri Jul 30, 2010 5:18 am

If you run the command "ruby -v" in Terminal, what version does it say? I'm guessing it's "ruby 1.8..." (rather than 1.9), because I forgot to make the Mac Pack script add "/usr/local/bin" to your "PATH". I would have thought using the one-click installer would do that for you, but maybe they forgot too.

To fix it so that you are using ruby 1.9, edit the file "/Users/${your_username}/.bash_profile" (or ".bashrc") and add this line at the bottom:

Code: Select all
export PATH="/usr/local/bin:$PATH"

Then save the file and log out of your computer and back in again. Now when you run "ruby -v", it should say the version is "ruby 1.9...", and you should be able to load Rubygame (but, you should use the "rsdl" command until the next version of Rubygame).

Let us know if that helps. :)
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: Installing RubyGame on Mac

Postby JRJurman » Fri Jul 30, 2010 8:27 pm

I could not find a .bash_profile file, and after creating one I still get 1.8.7, but I think the one-click installer was for 1.8.7, so do I have to install 1.9?

I have tried finding an installation guide for 1.9, but to no avail... This is probably the wrong place to ask this, but where can I find a guide/tutorial/link to install 1.9?!?!?
User avatar
JRJurman
 
Posts: 8
Joined: Tue Jul 27, 2010 10:30 pm

Re: Installing RubyGame on Mac

Postby JRJurman » Sat Jul 31, 2010 1:33 am

I installed ruby 1.9 with mac ports, and then tried it again, but I got the same error...

What is odd is that when I run "ruby -v" I get "ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-darwin10]"
However when I run "rsdl -v" I get "ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]"

I also noticed that when ever I add that line from .bash_profile, I get "ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0]" when I type "ruby -v"

I think that my different installations of ruby are messing up my system, and if need be I can reinstall Max OS X, but I don't want to resort to that...
User avatar
JRJurman
 
Posts: 8
Joined: Tue Jul 27, 2010 10:30 pm

Re: Installing RubyGame on Mac

Postby jacius » Sat Jul 31, 2010 5:54 am

JRJurman wrote:I installed ruby 1.9 with mac ports, and then tried it again, but I got the same error...

I think that my different installations of ruby are messing up my system, and if need be I can reinstall Max OS X, but I don't want to resort to that...

That won't be necessary. I would suggest uninstalling the macports version, then using the 1.9.1 one-click installer from http://rubyosx.rubyforge.org/. Also use the .bash_profile line I mentioned before.

After you'le done that, and logged out and back in again, run "ruby -v" to make sure you're using 1.9.1, then "gem install rubygame" to make sure Rubygame is installed. Then you should be good to go.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: Installing RubyGame on Mac

Postby JRJurman » Sat Jul 31, 2010 7:14 am

I feel like a noob for asking this, but where is the download link for 1.9.1

The only link for 1.9.1 I see is "Coming up shortly", the rest seem to be for earlier versions of ruby...
User avatar
JRJurman
 
Posts: 8
Joined: Tue Jul 27, 2010 10:30 pm

Re: Installing RubyGame on Mac

Postby jacius » Sat Jul 31, 2010 7:29 am

JRJurman wrote:I feel like a noob for asking this, but where is the download link for 1.9.1

The only link for 1.9.1 I see is "Coming up shortly", the rest seem to be for earlier versions of ruby...

D'oh, you're right. I didn't notice that. :oops:

Okay, ignore the 1.9.1 stuff for now, it's fine to use 1.8.7. You should still uninstall the macports version, use the .bash_profile line, and do "gem install rubygame", though.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: Installing RubyGame on Mac

Postby JRJurman » Sun Aug 01, 2010 2:04 am

Will gameruby work on 1.8.7? I uninstalled the mac ports version of ruby, but now when I try to run gameruby, I get a whole ton of errors... I might have to reinstall the mac pack, but wouldn't that put me in the same place I was before?

Did that one click installer work before or did people use mac ports or what?!?!? I've been meaning to get 1.9.1, and if I have to reinstall the Mac OSX, I'm ok with that (I actually just recently got a new mac mini because I've been running on a G4 until very recently)... I would really just like to get this working.
User avatar
JRJurman
 
Posts: 8
Joined: Tue Jul 27, 2010 10:30 pm

Re: Installing RubyGame on Mac

Postby jacius » Wed Aug 04, 2010 1:02 am

Sorry, I've been juggling so much stuff that I can't keep track of what I have released and what I haven't.

Rubygame is known to work on 1.8.6, 1.8.7, 1.9.1. However, currently you need to use the special "rsdl" interpreter on Mac to work, as mentioned in the installation guide. I've been working on a new version of ruby-sdl-ffi that will let Rubygame work on Mac without a special interpreter. It has been successful so far, but I haven't gotten around to actually releasing it yet.

The current Mac Pack is designed to work with the version of Ruby 1.8.6 that is installed on Mac OS X by default. A while back I worked on an updated Mac Pack with Ruby 1.9.1, which I also never got around to releasing. I got stuck trying to compile Ruby as a universal binary, then had to set it aside and take care of something else, and forgot about it.

I'll try to release the new ruby-sdl-ffi and mac pack this weekend.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: Installing RubyGame on Mac

Postby JRJurman » Wed Aug 04, 2010 7:15 am

No problem... I couldn't figure out what the exact problem was, but after a clean OS install it works under rvm ruby 1.9.2... Can't wait to try rubygame out! Thanks for the help!
User avatar
JRJurman
 
Posts: 8
Joined: Tue Jul 27, 2010 10:30 pm

Next

Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron