# Use Ruby on Rails for a standalone prototype?

**URL:** <https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079>\
**Category:** Rails\
**Created:** [March 5, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079 "2008-03-05T20:52:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![flag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@flag](https://www.ruby-forum.com/u/flag)\
**Post date:** [March 5, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079/1 "2008-03-05T20:52:06Z")

</div>

I need to develop a web prototype. I want to learn and use Ruby on  
Rails to do it. I don’t have an ISP for this project. I want to  
build it on my laptop (WinXP Pro), then zip it up nicely for a clean  
easy install on someone else’s laptop (most likely XP as well) –  
someone else who is not a developer.

Is Ruby on Rails a good choice for this type of standalone  
deployment? What are my deployment options using Ruby on Rails?

---

<div class="post-metadata">

**Author:** ![flag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@flag](https://www.ruby-forum.com/u/flag)\
**Post date:** [March 5, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079/2 "2008-03-05T22:10:04Z")

</div>

Sure, this is very easy with Rails. Your entire project is contained  
within  
the project directory structure, so if you Zip it up and send, all  
someone  
else needs to do is create the db tablespace and run rake db:migrate.

On Wed, Mar 5, 2008 at 11:51 AM, flag [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

–  
Henry  
[http://www.henrywagner.org/](http://www.henrywagner.org/)

---

<div class="post-metadata">

**Author:** ![flag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@flag](https://www.ruby-forum.com/u/flag)\
**Post date:** [March 6, 2008, 2:14am UTC](https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079/3 "2008-03-06T02:14:40Z")

</div>

You still need a way to run Ruby code on the “someone else’s laptop  
(mostly likely XP).” That laptop is not likely to have a Ruby  
interpreter installed. It’s also not likely to have a database server  
running either, so you can’t just “rake db:migrate” and expect that to  
work.

You can freeze Rails into the project’s vendor/rails folder so you’ll  
be good there, but you will need to install Ruby and a database on the  
other machine. I would highly recommend using SQLite for your database  
that way you can have the database file with pre-fill content all  
ready to go and have it stored inside your project as well. This is  
very easy now since SQLite is the Rails 2.0.2 default. It really  
works great for this sort of thing.

Oh, and one more thing. You would be fine running this with WebBRICK  
(the built-in Ruby web server), but for bit nicer experience you might  
want the mongrel gem as well. Also remember that if your application  
uses any gems you will also need to install those (and that will  
require RubyGems to be installed too).

---

<div class="post-metadata">

**Author:** ![flag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@flag](https://www.ruby-forum.com/u/flag)\
**Post date:** [March 6, 2008, 6:47pm UTC](https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079/4 "2008-03-06T18:47:16Z")

</div>

Thank you for your help. RubyScript2Exe and using SQLite sounds like  
just the ticket. Though I still cringe at the thought of putting  
together any installation process on Windows 🙂

We are now also considering finding an inexpensive shared web hosting  
service that supports Rails. What are the pros / cons of zipping up a  
standalone package with Ruby interpreter, WebBRICK, SQLite, and gems  
all included vs. deploying a Ruby app to a Rails hosting service?  
It’s just a prototype, so there’s no hard core bandwidth, disk space,  
or site management required. Looks like Site5 has some great deals –  
too good to be true?

---

<div class="post-metadata">

**Author:** ![flag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@flag](https://www.ruby-forum.com/u/flag)\
**Post date:** [March 6, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079/5 "2008-03-06T18:17:35Z")

</div>

As for the gem requirement, you can install gemsonrails (Dr. Nic) on  
your development machine. It allows you to do something similar to  
gems:freeze:rails, but with gems that are not part of the Rails core.

For distribution you might also want to check out RubyScript2Exe,  
which does the zipping that you describe but pops it into a self  
extracting exe. I think you have control over setup scripts as well.  
I believe that this is what InstantRails uses but I can’t swear to it.

Good luck!

---

<div class="post-metadata">

**Author:** ![flag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@flag](https://www.ruby-forum.com/u/flag)\
**Post date:** [March 6, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079/6 "2008-03-06T22:09:54Z")

</div>

I have used Instantrails to install, develop and distribute an entire  
Rails application on a 2GB flash drive. The performance is not  
exceptional, but is OK if it is a high speed USB drive.  
To transfer to another computer simply plug in the flash drive and  
load the program. Or copy everything to a directly to a subdirectory  
of your choice on the c: drive. Very clean isolated install.

I have heard about rubyscript2exe and will try it.

---

<div class="post-metadata">

**Author:** ![flag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/ce7236/32.png) [@flag](https://www.ruby-forum.com/u/flag)\
**Post date:** [March 13, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/use-ruby-on-rails-for-a-standalone-prototype/131079/7 "2008-03-13T15:41:36Z")

</div>

Fabulous alternative! Flash drive – why didn’t I think of that?  
That will come in handy because we may have an issue using a company  
provided laptop to do work on the side. If our new app is not  
actually installed on the company laptop that will help immensely.

Thank you!
