Mac Install Guide

Bounga edited this page Feb 1, 2012 · 7 revisions

Easy Install

If you have an Intel Mac (any Mac from 2007 or newer) and are using the default version of Ruby that comes with Mac OS X, try out the Rubygame Mac Pack for a really easy install!

More Difficult Install

If you have a PowerPC Mac (older than 2007) or are using a non-default version of Ruby, you will need to compile Rubygame's dependencies yourself, or ask nicely in the forums or #rubygame IRC channel for someone to do it for you.

Installing Xcode

Rubygame does not need to be compiled anymore (since version 2.6), but you will need to install the Xcode development tools in order to install the dependencies with Fink, Darwinports, or Homebrew.

You can find Xcode on your Mac OS X installation disc. Or, you can download Xcode online. You must first register as a Mac developer (it's free) to download.

  • Mac OS X 10.5 (Leopard) and 10.6 (Snow Leopard): Xcode 3.1
  • Mac OS X 10.3 (Panther) and 10.4 (Tiger): Xcode 2.5

Installing dependencies...

You have three options for installing the software libraries that Rubygame depends on: Homebrew, Fink, or Darwinports. Which option you choose is just a matter of preference. The end results will be more-or-less the same.

(Actually there is a fourth option: manually compiling each library from the source code. That is much more difficult, so it's not covered here.)

...with Homebrew

  1. Install Homebrew.
  2. Install SDL: brew install sdl
  3. (Optional, but highly recommended:) Install the SDL companion libraries:
    brew install sdl_gfx sdl_image sdl_mixer sdl_ttf

Thanks to Nonesuchplace for these instructions.

...with Fink

  1. Install Fink and update to the latest version.
  2. Open a new terminal (can be found in /Applications/Utilities).
  3. Install SDL: sudo apt-get install sdl
  4. (Optional, but highly recommended:) Install the SDL companion libraries:
    sudo apt-get install sdl-gfx13 sdl-image sdl-mixer sdl-ttf

Thanks to Matt Crinklaw for these instructions.

...with Macports

  1. Install Macports.
  2. Open a new terminal (can be found in /Applications/Utilities).
  3. Install SDL: sudo port install libsdl
  4. (Optional, but highly recommended:) Install the SDL companion libraries:
    sudo port install libsdl_gfx libsdl_image libsdl_mixer libsdl_ttf

Thanks to Raffael Mancini (sepisultrum) for these instructions.

Installing Rubygame

The simplest way to install Rubygame is: gem install rubygame

Or you can download the source from Github and follow the installation instructions in README.

Running an application

If all went well, you can now run Rubygame applications like so:

ruby a_rubygame_app.rb

If something bad happened along the way, you can ask for help in the forums. Be sure to include plenty of details and paste any error messages that occur (plus some of the text right before the error messages).