Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

MacRuby 0.3 Released (Now With Interface Builder Support)

By Eldon Alameda / September 15, 2008

apple_ruby-3.jpg MacRuby - a Mac OS X port of Ruby 1.9 designed to run directly on top of OS X's frameworks - recently hit a new milestone with the release of MacRuby 0.3.

In addition to the expected bug fixes and performance increases (they claim that MacRuby should now be up to YARV levels) the release also features a number of exciting Cocoa-derived GUI building enhancements, such as Rich Kilmer's HotCocoa - a new core library which simplifies Cocoa programming with simple Ruby idioms. Example:

require 'hotcocoa'
include HotCocoa
application do |app|
  window :size => [100, 50] do |win|
    b = button :title => 'Hello'
    b.on_action { puts 'World!' }
    win << b
  end
end

Just as exciting is the fact that MacRuby 0.3 now supports Interface Builder! With the new MacRuby - you can now define classes, outlets and actions in a MacRuby Xcode project and they will automatically appear in Interface Builder - very cool.

Post supported by Brightbox: Brightbox is a specialist European Rails hosting company. Each Brightbox server includes an optimised Ruby on Rails stack, SAN storage and access to a managed MySQL database cluster. They also manage dedicated clusters for large scale Rails deployments. Click here to learn more..

Comments

  1. Dale Campbell says:

    By installing MacRuby, will it conflict with the version of Ruby that came with OS X 10.5 (Leopard)? Also, how would it effect the gems I currently have installed (ex. Rails, Merb, etc.)?

  2. Eldon Alameda says:

    MacRuby is a separate binary and it's executables are all prefixed with mac* to avoid conflicts (i.e. macruby, macirb, etc, etc). So you should have no issues with other installed versions of Ruby.

    As for RubyGems - one of the key milestones for this release was that it was supposed to have a lot of improvements towards RubyGems compatability and the release notes say:

    "On the pure Ruby side of things, a lot of bugs have been fixed and we are now able to run some commands of RubyGems. Installing simple gems should work. Don't expect MacRuby to run Rails yet, though!"

    I haven't had a chance (really time) to install the new release and play with it yet, so I'm not sure what issues there are with the Gems.

    Hope that helps.

  3. Dale Campbell says:

    Thanks for the response Eldon. I did a little researching after posting the comment and found the answer I was looking for. Guess I should have done that before posting the comment. Heh.

    I've been playing around with MacRuby (and the packaged examples) for a day or two, and it's actually not bad. I'm just now getting into the HotCocoa stuff and that looks slick, as well. I'm gonna try and install a few of my gems to see how nice they play. :)

Other Posts to Enjoy

Twitter Mentions