# Can RoR do this? How easily?

**URL:** <https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023>\
**Category:** Rails\
**Created:** [March 4, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023 "2009-03-04T23:49:29Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 4, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/1 "2009-03-04T23:49:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 5, 2009, 12:55am UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/2 "2009-03-05T00:55:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 5, 2009, 9:22am UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/3 "2009-03-05T09:22:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 5, 2009, 10:09am UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/4 "2009-03-05T10:09:08Z")

</div>

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](http://bitnami.org/stack/rubystack)). 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 \<

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 5, 2009, 10:20am UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/5 "2009-03-05T10:20:18Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 5, 2009, 10:51am UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/6 "2009-03-05T10:51:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 5, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/7 "2009-03-05T16:45:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 11, 2009, 7:05pm UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/8 "2009-03-11T19:05:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 5, 2009, 5:55pm UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/9 "2009-03-05T17:55:35Z")

</div>

David,

Maybe something like rubyscript2exe is a way forward. See:

[http://www.erikveen.dds.nl/rubyscript2exe/](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

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 11, 2009, 7:34pm UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/10 "2009-03-11T19:34:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 11, 2009, 8:30pm UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/11 "2009-03-11T20:30:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 14, 2009, 3:21am UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/12 "2009-03-14T03:21:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zonker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/439d5e/32.png) [@Zonker](https://www.ruby-forum.com/u/Zonker)\
**Post date:** [March 12, 2009, 11:07pm UTC](https://www.ruby-forum.com/t/can-ror-do-this-how-easily/162023/13 "2009-03-12T23:07:47Z")

</div>

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/](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/](http://www.sproutcore.com/) (Apple is using this for  
[Mobile.Me](http://Mobile.Me) - management may like that)  
Cappuccino: [http://cappuccino.org/](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](http://couchdb.apache.org/docs/overview.html)

–Matt J.
