Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a self contained Ruby (and Rails) solution that can be run from a flash drive? [closed]

In the near future, I may be teaching a Ruby programming class to undergraduates at an art college. It's a safe assumption that the students have little to no experience with programming. The class will be taught in a computer lab, but they don't have any administrative rights on the lab computers.

Ideally, I'd like the students to be able to run Ruby from a flash drive both in the lab and on their computers at home. Even better is if it could be done relatively transparently on both a Mac and a Windows computer (I assume Linux users probably know how to set up Ruby anyway). And even better is if they could run Ruby on Rails and/or install gems using the Ruby installation on the Flash drive.

Is this entirely unrealistic or is there a straightforward way to do this? These will be non-programmer, art students, so the less setup on their end, the better.

Edit:

I should have mentioned that I'm aware of a few different one click installers for Ruby and Rails. I guess I'm wondering if there's a way that I can have give the students an already configured install that runs off of a flash drive and allows them to run Ruby scripts and maybe even install gems.

like image 465
Matt Ephraim Avatar asked Oct 26 '25 10:10

Matt Ephraim


2 Answers

To start, you will need two copies of Ruby on your USB drive: one for Windows and one for Mac OS X.

You will then need to create a script in each to add Ruby to the path and open a terminal.

I would structure it like this:

  • ruby
    • windows
      • bin, lib, etc...
      • start.bat
    • mac
      • bin, lib, etc...
      • start.sh

Windows

Content of start.bat

@echo off
set PATH=%CD%\bin;%PATH%
start cmd

Create a shortcut to start.bat with the working directory being ruby/windows

Mac OS X

Content of start.sh (Not sure of equivalent script file)

...

Then create a shortcut to execute the script.

Now, instead of starting a terminal up normally, use the shortcuts and Ruby will run from the USB drive.

like image 89
Samuel Avatar answered Oct 28 '25 23:10

Samuel


InstantRails sounds like it's what you need. It's only on Windows at the moment, but they do plan to port it.

It runs Apache and MySql with Rails and comes with a syntax hilighting text editor and some other bits and bobs.

like image 33
Steven Robbins Avatar answered Oct 28 '25 22:10

Steven Robbins