JRuby Installation Guide
From Rubygame
This wiki has moved! You can view and edit the new wiki on GitHub!
Contents |
Rubygame 2.6 and higher can be used with JRuby 1.3 and higher on Linux and Windows. (Unfortunately, Rubygame does not currently work with JRuby on Mac.)
Installing a Java Runtime Environment
Linux
- Debian, Ubuntu, etc.:
sudo apt-get install default-jre - Gentoo:
sudo emerge dev-java/sun-jre-bin
Windows
When downloading JRuby, just choose the "Windows Executable+JRE" package.
Installing JRuby
Linux users note: Rubygame will only work with JRuby 1.3 and higher. If your package manager doesn't have a recent enough version of JRuby, you should download from the link above.
Installing Library Dependencies
Install SDL, SDL_gfx, SDL_image, SDL_mixer, and SDL_ttf according to the installation guide for your operating system:
Installing the FFI gem
JRuby includes FFI support by default, but you must install the ffi gem in order to resolve dependencies.
First, try to install the ffi gem this way:
jruby -S gem install --platform=java ffi
If that fails, you should download the latest ffi-*-java.gem (e.g. ffi-0.5.1-java.gem) and install it like so:
jruby -S gem install --local ./ffi-*-java.gem
Installing Rubygame
jruby -S gem install rubygame