Ruby app on a CD

H

Hans Fugal

I have a client who wants to make an interactive CD to accompany a book.
By interactive I mean search, hyperlink, etc. content from the book,
not like homestarrunner.com or pbskids.org or something.

The application isn't too complicated, and I'm likely going to do it in
Ruby - maybe as a Rails app or maybe Camping, or if it's easy enough
possibly some GUI toolkit. The question then is, can I have a standalone
Ruby on the CD that will work on Windows without any install step? I'm
not overly familiar with Ruby on Windows (or Windows in general). It
would also be nice to have a static ruby that would work on linux x86,
but I'm comfortable with a README that says "install Ruby" in it when
push comes to shove. OS X (Tiger and up) has Ruby already. So Windows is
the real question.

So I envision a .bat file (.sh on linux/osx) that fires up a local
webserver (mongrel or webrick) and serves up a camping or rails app off
the CD, accessing the data in SQLite, or perhaps just reading it in from
a YAML or XML file (the data set is not huge).

I think this should be not-too-difficult, but I appeal to the group
wisdom for any gotchas that I may not foresee.

Thanks
 
K

khaines

So I envision a .bat file (.sh on linux/osx) that fires up a local webserver
(mongrel or webrick) and serves up a camping or rails app off the CD,
accessing the data in SQLite, or perhaps just reading it in from a YAML or
XML file (the data set is not huge).

Sure. This works just fine.

I've done this for a couple customers, setting up copies of their
applications and sites to run off a CD, so that they could go to trade
shows and demonstrate their stuff without needing an internet connection.


Kirk Haines
 
T

Trans

Sure. This works just fine.

I've done this for a couple customers, setting up copies of their
applications and sites to run off a CD, so that they could go to trade
shows and demonstrate their stuff without needing an internet connection.

Did you use rubyscript2exe or did the computer already have the Ruby,
etc. installed?

Another alternative, I imagine, is a mini-boot disk.

T.
 
M

M. Edward (Ed) Borasky

Trans said:
Did you use rubyscript2exe or did the computer already have the Ruby,
etc. installed?

Another alternative, I imagine, is a mini-boot disk.

T.
You mean like a LiveCD? There are lots of "live CD kits" out there to
choose from. Or you could make a VMware image with VMware Server and
then distribute it on a CD or DVD.
 
M

M. Edward (Ed) Borasky

Hans said:
I have a client who wants to make an interactive CD to accompany a book.
By interactive I mean search, hyperlink, etc. content from the book,
not like homestarrunner.com or pbskids.org or something.

The application isn't too complicated, and I'm likely going to do it in
Ruby - maybe as a Rails app or maybe Camping, or if it's easy enough
possibly some GUI toolkit. The question then is, can I have a standalone
Ruby on the CD that will work on Windows without any install step? I'm
not overly familiar with Ruby on Windows (or Windows in general). It
would also be nice to have a static ruby that would work on linux x86,
but I'm comfortable with a README that says "install Ruby" in it when
push comes to shove. OS X (Tiger and up) has Ruby already. So Windows is
the real question.

So I envision a .bat file (.sh on linux/osx) that fires up a local
webserver (mongrel or webrick) and serves up a camping or rails app off
the CD, accessing the data in SQLite, or perhaps just reading it in from
a YAML or XML file (the data set is not huge).

I think this should be not-too-difficult, but I appeal to the group
wisdom for any gotchas that I may not foresee.

Thanks

Instant Rails??
 
D

dtuttle1

Instant Rails??

I did something similar on osx. I think windows is simpler because all
the ruby and extension code is contained in the c:\ruby directory. I
think all you have to do is copy the ruby dir to your cd, set you PATH
in the .bat file to point to the ruby\bin on the cd, and maybe use the
'ruby -I' switch to add your ruby libs to your load path.
--Dave
 
M

M. Edward (Ed) Borasky

I did something similar on osx. I think windows is simpler because all
the ruby and extension code is contained in the c:\ruby directory. I
think all you have to do is copy the ruby dir to your cd, set you PATH
in the .bat file to point to the ruby\bin on the cd, and maybe use the
'ruby -I' switch to add your ruby libs to your load path.
--Dave

Mixing read-write and read-only filesystems is quite tricky and requires
thinking, planning and coding. OTOH, a CD with the Instant Rails
distribution plus the application Rails code is a simple install to the
PC hard drive, where it will just work. :)
 
H

Hans Fugal

Sure. This works just fine.

I've done this for a couple customers, setting up copies of their
applications and sites to run off a CD, so that they could go to trade
shows and demonstrate their stuff without needing an internet connection.

Have you run into any issues with rails on a cd (which is read-only)?
Obviously you couldn't make changes to the database, but will it work
fine in other respects for a read-only application?

Ed, Instant Rails has good potential for this project. though Apache and
MySQL is a bit heavyweight for what's needed. It would have to be
transparent to the user, though. Do you know if it can be driven
completely from a script? i.e. it says "Instant Rails will detect that
it is being started from a new directory and ask if you want to have it
update the paths in the all of the configuration files... Just say yes."
 
K

khaines

Have you run into any issues with rails on a cd (which is read-only)?
Obviously you couldn't make changes to the database, but will it work fine in
other respects for a read-only application?

Ed, Instant Rails has good potential for this project. though Apache and
MySQL is a bit heavyweight for what's needed. It would have to be transparent
to the user, though. Do you know if it can be driven completely from a
script? i.e. it says "Instant Rails will detect that it is being started from
a new directory and ask if you want to have it update the paths in the all of
the configuration files... Just say yes."

In my case, I was not using Rails.

I didn't use Apache, either. I kept it simple in that regard and just
used webrick. For something like this, webrick is more than fast enough,
and that eliminated a whole class of dependencies and configuration.

they also did install the db on their hard drive, because they wanted to
be able to have the full functionality to edit things. MySQL has a
zipfile version that was ideal for this, though. I just gave them a very
simple installation file that they unzipped, and the .bat that started
everything up took care of launching all of the pieces for them.


Kirk Haines
 
G

Gregory Brown

In my case, I was not using Rails.

I didn't use Apache, either. I kept it simple in that regard and just
used webrick. For something like this, webrick is more than fast enough,
and that eliminated a whole class of dependencies and configuration.

they also did install the db on their hard drive, because they wanted to
be able to have the full functionality to edit things. MySQL has a
zipfile version that was ideal for this, though. I just gave them a very
simple installation file that they unzipped, and the .bat that started
everything up took care of launching all of the pieces for them.

For me, using camping + sqlite works great. you can get everything to
run from a directory with a little effort, and the database is just a
file.

-greg
 
R

Robert Klemme

2007/8/7 said:
I have a client who wants to make an interactive CD to accompany a book.
By interactive I mean search, hyperlink, etc. content from the book,
not like homestarrunner.com or pbskids.org or something.

If you just need hyperlinking and searching, PDF would be sufficient.
You can even link between several documents and web URLs. Plus you
get pretty good layouting options. Plus you can generate it with
PDFWriter in Ruby.

Just an idea in case there is no more interactivity required beyond
what you mention.

Kind regards

robert
 
F

F. Senault

Le 10 août à 13:33, Robert Klemme a écrit :
If you just need hyperlinking and searching, PDF would be sufficient.
You can even link between several documents and web URLs. Plus you
get pretty good layouting options. Plus you can generate it with
PDFWriter in Ruby.

Depends on what you mean with searching.

For instance, I have the PickAxe on PDF, but I'd like to have a better
search in the APIs than that - the chm version that comes with the
one-click ruby installer is nice for that.

(No need to direct me to websites & softs out there, this is not the
point...)

Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top