Distributing A Rails App

I've done some Google searches and searched the mailing list archive
without much success.

I'm working on a rails app that will be a simple story tracking tool
for Scrum/Agile projects. When it's functional, I'd like to make it
available as a live app on my site, but I'd also like to make it
available as a distribution so that someone could grab a
self-contained package and install it locally.

Is there a good way to create a gem, say, that could handle this?
I've been looking for tutorials or articles about creating gems, but
I'm still a bit lost on how that might translate into packaging a
rails app. Or is there some other good way distribute?

Thanks for any insights.

Troy

Check this out: http://ajaxian.com/archives/slingshot-desktop-apps-via-rails

Ability of Rails app that can run locally and synchronize with the server is very powerful.

I imagine you are having trouble finding information about that. Rails
is a web application framework. It is not intended to be used to build
desktop applications. If you're talking about distributing the
application to individuals that are unfamiliar with Ruby on Rails,
then I just don't know of anything existing that would make this
practical.

You would need to develop your own "runtime" environment installer to
make sure that all the necessary pieces required to run the
application get installed on the user's computer. Ruby, all the gems
you might have used in your application, the Rails application itself.
Then you would need to create a script, or some other means, to allow
the user to start Mongrel server and take them to the URL where the
program runs.

Running Rails as a desktop application is simply outside the scope of
Rails, which means that you're probably on your own in finding a
solution.

Thanks for the reply, Robert. Right, I should have explained. This
isn't meant as a desktop app, but anyone who wanted to actually use
the application would probably like to run it on a local server rather
than as a hosted application since it tends to contain potentially
sensitive information about software features.

So, what I'm looking for is an easy way to package up the important
parts of the rails app so that someone who has rails running could
easily deploy my app to their environment. Perhaps just zipping it up
would be enough, but I was hoping for something more, uh, rubyish or
railsy.

Thanks again,

Troy

As far as I know, you can just create a tarball/zip file. I believe
this is what the guys who make Warehouse
(http://www.warehouseapp.com/) do.

--Jeremy

Zip it, or provide an SVN repository so someone can check it out.

Provide a rake task to boostrap the database to make setup a snap :slight_smile:

Create a plugin:

- http://wiki.rubyonrails.org/rails/pages/Plugins
- http://nubyonrails.com/articles/2006/05/04/the-complete-guide-to-rails-plugins-part-i
- http://railsforum.com/viewtopic.php?id=682

Cheers, Sazima

If you want to keep it easy to install, look at distributing it with
Jumpbox. Distributing apps with svn or tarballs is easy, but good
luck helping everyone install it :slight_smile:

Gems are an awesome way to go too. Suprised nobody has mentioned it yet.

With Gems on Rails, you get some pre-load functionality options as well.

How feasible is it to write a ruby on rails app. and distribute it
commercially, similar to many PHP applications, where you unzip, and
click a link in the browser to install.

How feasible is it to write a ruby on rails app. and distribute it
commercially, similar to many PHP applications, where you unzip, and
click a link in the browser to install.

Nearly impossible, unfortunately. Running a rails app requires more
process management.

Exactly. To do any real configuration changes you'd need to restart
the app, thus making the convenience of doing everything in the
browser useless. :stuck_out_tongue:

--Jeremy

Thanks...I've got some applications I've thought about doing in Rails,
but this seems to be my biggest challenge...I've seen a lot of info
about the framework and ruby, but as a viable commercial application
(one that is distributed)...I have not seen too much info. Seems most
people use it for their own needs -- one application only (aside from
plugins, but I don't think the entire app would works as a plugin).

My second plan (if there is no easy-to-install distributing method for
rails) is to sell the application to clients with a hosting and
maintenance plan as well...and just take care of the management,
updates, hosting, etc. myself for each customer.

This leaves me at the point of figuring out how to distribute/rsync/
push -- whatever you want to call it, to multiple web sites, that do
not use same data, or could even have customizations on a per-client
basis to the main trunk.

If anyone knows of any rails-specific books covering this SCM
scenario, I'd be more than interested in knowing about them.

Check out Mingle. Their install process is pretty awesome, and the product aint half bad either.

Check out Mingle. Their install process is pretty awesome, and the
product aint half bad either.

One should point out that the secret sauce here is jruby, since (in
super condensed form) you get to lean on java deployment options

Fred