views:

633

answers:

7

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.

+1  A: 

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.

Steven Robbins
A: 

RubyStack might work. It also comes in a JRuby version for platform-independence.

Rich Apodaca
A: 

I'd recommend Locomotive for running Ruby/Rails on OS X.

+3  A: 

To start you will need two copes 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: start.bat

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

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


Mac OS X: start.sh (Not sure of equivalent script file)

...

Then create a shortcut to execute the script.


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

Samuel
A: 

AFAIK. Ruby and Rails are part of recent Mac OSX builds. I don't know about versions or how long this has been the case though.

I can't see why you couldn't install ruby to a flash drive, then install all the relevant gems (rails, obviously plus a few updates like gem system and the latest rake, and I think I'd go for mongrel rather than webrick). In Windows, all you'd need after that would be ?:\ruby\bin on the path, which would probably be fairly easily achieved via a CMD file on the drive (there might need to be a little cleverness to get the drive letter right). After that, it should just work. I imagine the same would be true for Macs, although gem update rails might be all that's needed.

Mike Woodhouse
+1  A: 

You may want to check RubyStack, as one of the posters mentioned earlier. Although it does not run from a USB stick, the installers contain everything that you need to get started (including hard-to configure/compile stuff like ImageMagick). Since they are packaged with BitRock installers they do not need to have admin privileges. You did not mention a specific operating system, but Rubystack runs on Windows, Mac and Linux, so your students can rely on the same exact configuration regardless of what they have at home. It is also completely free.

Daniel Lopez
+1  A: 

It's not precisely what you asked, but you could use http://herokugarden.com/ which is a complete Ruby on Rails environment that's hosted and accessible through the browser, which lets the students work in class and at home.

As I understand it, ThoughtBot (a well-known Rails consultancy/training shop) uses it in their training courses for precisely that reason.

John Paul Ashenfelter