views:

2326

answers:

9

I am developing an application in using Ruby on Rails, mostly as an excuse to learn the language.

This is not intended to be a web-based application - and perhaps I have chosen the wrong language, but...

My understanding is, that in order to run an instance of this application on somebody else's computer, they would need to install ruby on rails, and a webserver (or webrick, perhaps), as well as my application code.

I am just curious if there are any other options for distributing my application as a standalone app, or perhaps just a simple way to package up a web browser and ROR together with my app for a simple, one-step install?

+1  A: 

Gears on Rails maybe?

Chris Upchurch
+3  A: 

I have personally never needed to do this. But, I have ran across this tutorial http://www.erikveen.dds.nl/distributingrubyapplications/rails.html that I think will be helpful. The tutorial covers how to actually convert a rails app into a standalone exe file.

Josh Moore
This looks like exactly what I need, with potentially 2 drawbacks:1) It is unclear whether clicking on the resultant executable actually launches a webserver, or if not, what it does2) It doesn't look like you can package the app for cross-platform. Is that the case?
Brent
+1  A: 

You can include Ruby on Rails by freezing it to the version of Rails you want to use in your project. They call this Freezing. The user will not have to install Rails to use your application. You can do this with any library you use in your project. If the project uses a library, just place it under the Vendor folder in your project. Then use a tool similar to what @Josh answered with to package it.

You will need a web server to run the project though. There is no way around this. Ruby on Rails is just like ASP.NET in this regard, in that it is a server side framework. The server runs the code and outputs the HTML to the browser by using the Rails framework.

Unfortunately, you may have picked the wrong framework to do what you want. Instead of Ruby on Rails, you may want to check out Shoes, which is a framework for developing GUI applications using Ruby.

Dale Ragan
A: 

Are you interested in Rails or just Ruby? If learning Ruby is your goal, then the user would need to install Ruby, but not worry about dealing with the Web Based config.

+3  A: 

Joyent's Slingshot might be a good bet.

Joyent Slingshot allows developers to deploy Rails applications like a standard desktop application, which work online and offline (with synchronization), have drag and drop, and interact with all the other desktop applications.

With Joyent Slingshot:

  • Create a hybrid Web/desktop application
  • Synchronize online and offline data
  • Use the same code for online and offline application(s)
  • Deploy and update your application easily
  • Drag into and out of application

Here are some further links to help with your evaluation and/or to help you get started:

Charles Roper
Is this still available? I cannot find it anywhere. The links are all dead ends.
rube_noob
+1  A: 

You could always consider compiling your Ruby to JVM byte-code (via JRuby) or .NET byte-code (via IronRuby) to distribute to people who have those virtual machines and don't want to install a Ruby runtime.

You might want to check out Shoes for building desktop applications in Ruby. Rails really is tuned for building websites.

James A. Rosen
A: 

You do not specifically say whether it is supposed to be a GUI application or not. From the other answers, I would guess so.

Therefore, you need to clarify what your goals are. RoR is a specialized framework for web applications. If your goal is to learn RoR, I'd say to get yourself some inexpensive web hosting and make yourself an app. If your goal is to learn Ruby, not necessarily Rails, then Shoes, IronRuby, JRuby, MacRuby and others may be good options to look at.

ottobar
A: 

The way most people ship ruby programs, including Rails webapps, as a standalone exe is via rubyscript2exe. They describe how to package a Rails application at http://www.erikveen.dds.nl/distributingrubyapplications/rails.html. Ruby, Rails, and all the associated libraries will be included in the EXE file.

As others mentioned, Ruby is not necessarily Rails and if you really want an easy way to write a distributable GUI application in Ruby, Shoes is an excellent place to start looking.

cpm
A: 

deam thank you guys i love this tutorial xD

http://www.erikveen.dds.nl/distributingrubyapplications/rails.html

now im really in love with ruby on rails