Skip to content


Subversion checkout URL

You can clone with
Download ZIP
RubyOSA is a bridge that connects Ruby to the Apple Event Manager infrastructure, automatically populating the API according to the target application's scriptable definition.
Ruby C
Branch: master


Ruby OSA – Applescript Bridge in Ruby

This is a Github port from the 2007 version of ruby-osa from rubyforge. There is a Bus Error due to an old libxml-ruby dependency. This fixes it and allows you to develop it easier. Note: this is a local gem installation.

Before you install this, install an older version of libxml-ruby:

sudo gem install libxml-ruby -v=
sed -i -e "s|require ‘xml/libxml’|gem ‘xml/libxml’, ‘= 0.9.5′|" /path/to/gems/rubyosa-0.4.0/lib/rbosa.rb

Then install it (from this source, since sudo gem install ruby-osa installs from rubyforge and is outdated):

git clone
cd ruby-osa
rake install

And install the rdoc of your favorite app to see all the methods!

rdoc-osa --name iTunes --op iTunes_rDoc


RubyOSA is a bridge that connects Ruby to the Apple Event Manager

It automatically populates the API (classes, methods, constants) according
to the target application’s scriptable definition.

RubyOSA is an alternative to RubyAEOSA, and meant to replace it.

RubyOSA is licensied under a BSD license, see the COPYRIGHT file for more

More information on the project home page:


Mac OS X 10.4.X or greater
ruby 1.8.X or greater
libxml-ruby 0.3.8 or greater

Get started

$ ruby extconf.rb
$ make
$ sudo make install
$ sudo make install-extras

`make install’ will only install the core of the bridge, while
`make install-extras’ will install some additional tools such as the rdoc-osa


A tutorial is available online at

Sample code is available in the `sample’ sub-directory.

The rdoc-osa tool can be used to generate API reference documentation
for the given application. See its —help flag for more information
about how to use it.

Feel free to send feedback to

You can also file bugs, patches and feature requests to the tracker:

When reporting a bug, please set the AEDebugSends and AEDebugReceives
environment variables to 1 and attach the logs.

Something went wrong with that request. Please try again.