Portable Ruby On Rails - Run RoR on thumb drives
06/02/07 16:32 Filed in: Work
Days ago, I was planning a demo of one Rails application to a potential client. I could bring and show it on my MacBook Pro, but it might leave the client thinking “this might not work well on Windows”. So I came up with a solution: Plug in a thumb drive, double click a shortcut, application runs on client’s Dell laptop, and here it is.
portable_ror-1.zip (9Mb)
What’s in it?
- Ruby 1.8.5 for Windows (thanks for One Click Windows Installer)
- Sqlite 3.3.7 (under ruby/bin)
- Gems: Rails, Mongrels, RSpec, Watir, ... (To minimize the file size, I removed all docs).
To Install/update a new gem
G: \ruby\bin\gem.bat install --no-rdoc --no-ri
your.gem
(I didn’t want to install rdoc stuff, as it takes space and time)
Install a rails application
Assume your thumb drive was assigned as "G:", you shall see the folder
G:\ruby\gems\railsappsJust unzip your cool rails app there.
To start a rails application
cd G:
chdir \railsapps\rvideostore
\ruby\bin\mongrel_rails start --environment
development --port 5000 --log log\mongrel.log --pid
log\mongrel.pid
This is the kind of thing that is not difficult to do, but may get ‘WOW’ effect.