Add ruby gem config + minor cleanups

Use home directory $HOME/gems for ruby gems. Fix editor to always use
emacs in no window mode.