What you need first

If you didn't already have it

  1. Install ruby, rubygems and rake

    Or use the one-click installer (MacOSX)

  2. Get AIR SDK

    This gives you command line tools, including: adl and adt.

  3. Get Flex 3 SDK

    Choose 'Open Source Flex SDK' link

    This gives you command line tools, including: mxmlc and fcsh.

  4. Install airake (for Mac):

    sudo gem install airake

    While you're in the Terminal, include the AIR SDK and Flex SDK bin directories to your path:

    export PATH="/path/to/air_sdk/bin:$PATH"
    export PATH="/path/to/flex_sdk_3/bin:$PATH"
  5. Install airake (for Windows):

    gem install airake

    Add c:\path\to\air_sdk\bin and c:\path\to\flex_sdk\bin to your Control Panel, Enviroment Variables, Path

    Flex compiler requires a JRE (install java if you don't have it)

  6. Install the AIR runtime

Getting started

  1. Create your AIR project:

    airake MyProject

    A new project is created.

  2. Run it:

    rake adl

    For faster compiling using the Flex Compiler Shell (FCSH), start (or stop/restart) the FCSH daemon:

    rake fcsh:start
    rake fcsh:stop
    rake fcsh:restart
  3. Test it:

    rake test

    It uses FlexUnit.

  4. Package it:

    rake package

    Look for MyProject.air in the project bin directory.

    If you need to create a certificate, run:

    rake certificate


The airake.yml sets up your default, development, and test environments.

The properties listed are defaults that may be overriden or added to by the env section.

mxml_pathPath to application mxml
appxml_pathPath to application descriptor
src_dirsArray of source paths
lib_dirPath to lib dir
air_pathFile to create for packaged AIR file
swf_pathFile to create for generated swf file
assetsAssets (files and directories) to include in package
certificatePath to certificate to sign packaged file
debugWhether debug is on or off
mxml_path: src/MyProject.mxml
appxml_path: src/MyProject-app.xml

src_dirs: [ 'src' ]
lib_dir: lib 

air_path: bin/MyProject.air
swf_path: bin/MyProject.swf
assets: src/assets
certificate: cert.pfx

  debug: true

  mxml_path: test/Test.mxml
  appxml_path: test/Test-app.xml
  src_dirs: [ 'src', 'test' ]
  debug: true

You can setup new environments in the airake.yml. The default env is development and can be specified via AIRAKE_ENV env variable.

  mxml_path: src/com/foo/ui/Foo.mxml
  appxml_path: src/Foo-app.xml
  air_path: bin/Foo.air
  swf_path: bin/Foo.swf

Then run tasks using that env.

AIRAKE_ENV=foo rake adl

Would then run the ADL task using the overriden settings.

Learn more

Go to the resources page