Crate - Packaging Standalone Ruby Applications
by Jeremy Hinegardner
- 9,617 views
This is the version of my Create talk I gave at Railsconf 2009. ...
This is the version of my Create talk I gave at Railsconf 2009.
Sometimes the best solution is a standalone application that you can give to a client or customer to just drop on a machine and run. Maybe it is a web service, or a desktop data entry application, or mass deployed background agent, or you have no control of the deployment environment. In any case, there are situations where deploying a full ruby stack may not be an option.
This talk will cover the Crate project and how it may be used to package your application, be it commandline, server, or web application. The end result is a statically built, standalone executable of the ruby interpreter and all dependent binary extensions. The application code, ruby stdlib, dependent gems, and other assets are packed into one or more SQLite databases.
Statistics
- Likes
- 5
- Downloads
- 70
- Comments
- 0
- Embed Views
- Views on SlideShare
- 8,672
- Total Views
- 9,617


How many of your know how many instance of your application there will be?
Desktop applications?
IT Shops? distribute small apps to your company for command / control monitoring ?
eee.gz is ruby + extensions + the application
trailer at the end.
mac, windows, linux, cygwin
I want to deployt to Solaris, AIX, HPUX, virtually anywhere ruby can run, I want crate to run.
I want to deployt to Solaris, AIX, HPUX, virtually anywhere ruby can run, I want crate to run.
2. set ARGV for ruby
3. initialize all statically compiled extensions
4. bootstrap the Amalgalite driver
5. remove all filesystem directories from the $LOAD_PATH
6. switch to using Amalgalite backed require
7. require the file in the C constant CRATE_MAIN_FILE
8. instantiate a single instance of the class named in the C constant CRATE_MAIN_CLASS
9. invoke run( ARGV, ENV) on the newly instantiated class
10. exit
would you like me to expand on anything, show some more code, yell and scream at me,