Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distributing Rails applications in an OSX .app container

I want to distribute a Rails application within a .app package, so it can run from 10.4 to 10.6; is there any howto or hint on how to do that? Especially the following things make me twist my head:

  1. I want to repackage the app with Ruby 1.8.6, so it would run even if there is an older version of Ruby installed on the system (such as 1.8.4 in Mac OS X Tiger) - how would I come around the universal binary problems? Can I just add Ruby and use this specific Ruby version to run my app?

  2. IMPLEMENTATION: I want to have a .app that starts thin or mongrel when the app is started and stops the app when it is closed. Is there any example OS X XCode project out there (or any other example)?

  3. Is an XCode container the way to go? What are the other options I have?

like image 823
z3cko Avatar asked Nov 15 '22 13:11

z3cko


1 Answers

How about using jRuby for your application, you could then package your whole application as a single .jar file and distribute it that way.

I've been able to run my Ruby on Rails appliations in jRuby without any major modifications to the application besides changing the native MySQL driver with a pure java JDBC implementation.

Also check out this similar question and the Kenai project for more information about jRuby.

like image 197
Wolfgang Avatar answered Dec 28 '22 09:12

Wolfgang