Can you run Linux command line apps on Android? I'm brand new to Android; in fact I've never owned one.

But I'm traveling all this summer, and I'm very interested in doing some programming while I'm on the run.

QUESTION: Is it possible to run a full Ruby development environment with Emacs on Android?  How?

And does "rooting" give you anything close to a real Linux system?
"Rooting" allows you access to the internal Android environment, which of course consists of more than just the Linux kernel.  So you are running Linux, but you should consider it as though you are running under a different distribution than say Debian or Redhat.

There's a different set of standard libraries and some files are in different locations.  At least on my Droid ext2 support is not built-in by default.  There is also no init or cron.  The full set of Linux modules is not available unless you compile them yourself and put then in /system/lib/modules.  Important ones you may miss on standard ROMs are cifs, ext2, tun, and others.

Most, if not all, phones running Android are ARM CPUs.  So the binaries you run on them must be ARM "EABI" "soft-float" binaries.  If you have the source you can cross-compile whatever utilities you need, but read on.

There are many standard commands and utilities available in the /system/bin directory such as grep, ps, cp, rm, mv, ls, ip, even vi.  You have enough to get by until you...

...use the "Linux Installer" utility to install a chroot'ed Debian environment.  Debian has supported ARM for a while.  It takes some work, but if you can root your phone, and have a sizeable enough SD card, this is the way to go.  

This is close to a standard Linux system and under it you can install and run Ruby.  Of course CPU and RAM limitations come into play.