This is FAQ of Ruby/SDL.

Q. I can't use Ruby/SDL on FreeBSD. Why?

I have install Ruby/SDL on FreeBSD, but I just get following message.

/usr/libexec/ /usr/local/lib/ Undefined
symbol "pthread_mutexattr_init"

A. Please use ruby_r

Ruby/SDL needs pthread, so you should use `ruby_r', ruby interpreter linked with pthread library. You will install ruby_r from Ports or Packages Collection. In latest ports, rubysdl uses ruby_r, so you may install from ports.

Q. Can I use thread?

I want to use thread functions of SDL.

A. You can't use SDL's thread. Please use Ruby's thread.

Ruby/SDL can't handle SDL's thread. If you want to use thread, you will use Ruby's thread, or you may redisign your script not to apply threads.

Q. My script doesn't stop normally on Linux.

My script doesn't stop normally when using SDL::Mixer on Linux.

A. Plsease use --disable-pthreads, or trap signals.

According to Lorien Dunn, irregular signal handling occures this problem. You can avoid this problem by two ways. First, when you compile SDL, you should run './configure' with '--disable-pthreads' option, second, put following script first in your program.

require 'rbconfig'

if RUBY_PLATFORM =~ /linux/

if you get the error of `uninitialized constant EXIT (NameError)', you should use following script alternatively,

require 'rbconfig'

if RUBY_PLATFORM =~ /linux/

Q. I can't use Ruby/SDL on MacOSX.

I can't use Ruby/SDL on MacOSX.

A. You should initialize Cocoa.

Accoring to NUNOKAWA, SDL needs to initialize Cocoa, before calling SDL_Init. And he have found a solution, please see <URL:> or <URL:> in detail. (this document is written in Japanese)