Can RoR do this? How easily?

I am consulting on a software project which is database intensive and
the interface is web-based. Users can download an installation package
which, if necessary, installs Microsoft IIS, some free Microsoft
database server (I think it’s a stripped-down version of MS-SQL) and
then the HTML, ASP, and JavaScript-based app. It only runs on Windows
machines and only works in IE. Oh, and it needed certain tweaks or
patches to make it work under Vista; the version which worked under XP
didn’t work 100% in Vista.

As one who appreciates standards and not being tied to one technology,
especially browsers, and having seen the database design and the
actual app in action, plus lots of insight into how difficult it is to
maintain, upgrade, etc., my immediate thought was: it must be possible
to do it better by adhering to web standards as much as possible
(rather than as little as possible), break the dependence on MS
products, etc.

I’m a huge fan of RoR but still relatively new to it, but based on my
readings (Agile Web Dev for Rails) and investigations, I thought that
this app would be perfect for RoR.

But, before I suggest making a switch which will take lots of time and
cost lots of money, I need to know how easy it would be for anyone to
take a basic office computer with just XP or Vista (or Mac!) and
install all that is necessary: a web server, a database, Ruby and
Rails, and the app itself?

What would need to happen is:

  1. User downloads my-app-install.zip
  2. User unzips download
  3. User runs install-my-app.bat or something like that.
  4. User opens any browser and enters: my-app.local (or whatever) and
    the app starts.

Is there a way to do this with a RoR solution?

Note: This web-based app would only be run locally, not as a general
website available to all.

I’d be really interested if anyone has done something like this or if
anyone has some thoughts on the matter.

If I’m not being clear, please let me know - I’ll try to rephrase.

Regards,
Zonker

adding an entire language with bells and whistles would complicate
your install package immensely. given your reqs I’d just plan to run
the whole thing in the browser and move it to .js and maybe a filedb.

Thanks for the response, but my interest is not in adding an entire
language, but switching to RoR.

I want to know if this is possible at all, not just with this app.

So the question is reduced to:

Is it possible to develop a RoR app that someone can download and
install all necessary pieces (web server, database, RoR, and app) for
local use only without any technical knowledge?

Hi David,

Always tough to answer a question about how easy something’s going to be
for
a completely non-technical user. (Tech people tend to have a blind spot
in
this area.)

I don’t personally know of anyone who’s distributing applications like
this,
so whether or not it’s possible for someone to make such a model simple
enough and to make it scale. Maybe have a look at Bitnami’s RubyStack
product (Ruby Cloud Hosting, Ruby Installer, Docker Container and VM). Something like that might
take you part of the way to where you want to go, though I’m not sure
how
you would go about wrapping your application code into the installation
package. (Maybe try getting in touch with them directly to see if they
do
custom distributions?)

On Thu, Mar 5, 2009 at 9:21 AM, David Nitzsche-Bell <

It might be worth looking at InstantRails. It provides a single
installation that installs (on Windows) Ruby, Rails, web server, mysql
and
sample rails apps ready to go. If I understand correctly this is
virtually
what you want to do I think (where your app replaces the sample apps).
That
suggests that what you want to do is at least feasible.

2009/3/5 Chris K. [email protected]

Just out of curiosity: Why did they decide on distributing the app
like this, instead of using a central database + web server?

Hi David,

On Thu, 2009-03-05 at 09:21 +0100, David Nitzsche-Bell wrote:

So the question is reduced to:

Is it possible to develop a RoR app that someone can download and
install all necessary pieces (web server, database, RoR, and app) for
local use only without any technical knowledge?

We’re developing a product that will be distributed in exactly this way.
I (and many others) began RoR using InstantRails which is a
‘zero-footprint’, full stack development environment.The distro also
includes a couple of fully functional example applications. So, IMHO,
the pattern’s been sufficiently vetted and that’s model we’ll be using.
We haven’t decided whether to stick with the .zip approach IR uses or to
go the ‘installer’ route, but are tending towards .zip.

The only ‘hard part’ I’m anticipating is ‘stripping down’ InstantRails
so that the package only contains the ‘stuff’ needed as a deployment
platform for locally run apps. The IR download is pretty big because it
includes pretty much everything you’d need for development and even
small deployment. Lots of opportunity for ‘slimming’. Apache - gone.
Scite - gone. PHPAdmin - gone. Etc.

Feel free to contact me off-line if you’d like.

Best regards,
Bill

Like Bill W., I am developing and deploying an application with
InstantRails. For development I prefer to use Linux but I just install
the app on InstantRails (and get rid of the sample apps) and zip it up
and the user just has to unzip it and run it. I include a couple of
scripts to put in your startup folder so the servers (db and web) start
up at windows login. On the unzip, it needs to go into a folder that
has no spaces in its file path so I recommend it be unzipped into c:

It works fine and is easy to install and uninstall.

Good luck
Norm

David,

Maybe something like rubyscript2exe is a way forward. See:

http://www.erikveen.dds.nl/rubyscript2exe/

I have used perl2exe, to do almost exactly what you appear to be
wanting achieve. It includes an embedded server and the app launches
the default user’s win32 browser, making it pretty seamless for the
user to get going. With rubyscript2exe you get one executable wrapping
up all the ruby and rails stuff. On a side note, in the perl version I
had some code to replicate and populate the application’s paths, but
mostly the perl2exe took care of the bulk of this. So far I have not
had chance to try out rubyscript2exe so if anyone can add their
experience I’d love to know.

John

Bill and Norm and others,

Thanks so much for this help and information. It really strengthens my
suspicions and I can confidently suggest a better path for future
development of the product.

Cheers,
David

Hi Norm,

On Wed, 2009-03-11 at 11:05 -0700, Norm wrote:

I include a couple of scripts to put in your startup folder
so the servers (db and web) start up at windows login.

Do circumstances allow sharing?

Best regards,
Bill

bill walton wrote:

Best regards,
Bill

Sure. They are nothing special and as I know very little about MS
systems there is probably a better way to do it but it works.

1 - start_mysql.bat
PATH C:\InstantRails\mysql\bin;%PATH%
mysqld

2 - start_server.bat
CD C:\InstantRails\rails_apps\open_campground
PATH C:\InstantRails\ruby\bin;C:\InstantRails\mysql\bin;%PATH%
ruby script\server -e production

They require manual editing if InstantRails is installed in someplace
other than C:
Just copy them into your startup folder and reboot…

Good luck
Norm

There’s already been several solid replies to this, but I’ll add that
there are some other possibilities.

For a browserless Ruby solution, you could take a look at Shoes:
http://shoooes.net/ (yes, three o’s…)

Or, try a more integrated user interface with XUL and Rails (see
Google for more; the best example I’ve seen is currently offline [Zed
Shaw’s CookbooXUL])

Or, what about a richer client-side Javascript implementation? There
are several promising frameworks currently in development:

SproutCore: http://www.sproutcore.com/ (Apple is using this for
Mobile.Me - management may like that)
Cappuccino: http://cappuccino.org/ (reimplements Cocoa-style APIs in
Javascript)
(and others…)

You didn’t describe what the app was doing with the database, but I’ll
throw in a mention of CouchDB; if you’re synchronizing the client-side
databases at any point, it could be useful.
http://couchdb.apache.org/docs/overview.html

–Matt J.