[MacRuby-devel] MacRuby questions

Kevin Walzer kw at codebykevin.com
Thu Jun 21 07:46:06 PDT 2012


Hello all,

I'm an experienced Mac developer trying to add Ruby to my toolbox. Most 
of my previous experience is with Python, Tcl, Objective-C, and 
AppleScript, and I'd like to add Ruby as well.

My interest in MacRuby stems in large part because it appears to have 
vastly superior app deployment tools than are found in standard Ruby, 
which are non-existent.

  I had a few questions about MacRuby and its differences from standard 
C-Ruby:

1. Is MacRuby mature enough to function as a drop-in replacement for 
standard Ruby? Are there significant gaps in functionality? 
Specifically, does ffi work? (I tried to run a "hello world" ruby-tk app 
using the ffi and ffi-tk gems, but MacRuby just segfaulted with an error 
code of 11.)

2. Is it possible to have a command-line toolchain/workflow for 
development and deployment of MacRuby apps, or is heavy use of Xcode 
required?

Here's a bit more about my specific use case for MacRuby:

I develop desktop apps using scripting languages; most of my experience 
to date has been with Tcl/Tk and Python/Tk, dropping down into 
Objective-C or C where necessary for speed or integration with specific 
API's, using just a basic text editor-Terminal workflow. (I'm one the 
maintainers of Tk on the Mac.) My apps integrate heavily into Cocoa or 
Carbon API's when necessary to implement stuff like NSServices, 
AppleScript support, etc. Both Tcl and Python have excellent support for 
deployment of desktop apps (Tcl has an entire standalone app 
environment, while Python has py2app and related tools). Standard Ruby 
has no such tools on the Mac whatsoever.

I like the fact that MacRuby would make AppleScript support for my app 
easy, and the macruby_deploy tool seems to be what's missing from 
standard Ruby--gathering all bits and libs into an app bundle, running 
install_name_tool where necessary, etc. The segfault with ffi-tk, 
however, has me concerned (this particular lib has been advertised to 
work with any and all Ruby implementations including JRuby).

Any guidance on these questions is apprecaited. I hope I'm able to move 
forward with a new app idea with MacRuby.

Thanks,
Kevin
-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com


More information about the MacRuby-devel mailing list