Most distros come with some kind of basic editor, such as nano and gedit. While they can be used to code Ruby (gedit in particular, as it's extensible and pretty capable), my editor of choice is Vim with the NerdTree script. We'll be installing Vim, pathogen (which makes installing vim scripts easier), NERDTree and set up syntax highlighting and auto indentation with two spaces. So we start off with a simple apt-get.
$ sudo apt-get install vim vim-gtk
Create a few vim directories and install pathogen.
$ mkdir -p ~/.vim/autoload ~/.vim/bundle $ curl -Sso ~/.vim/autoload/pathogen.vim \ https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim $ echo 'execute pathogen#infect()' >> ~/.vimrc
You need to set up a few things in your vimrc file. You can either copy /usr/share/vim/vimrc to ~/.vimrc as a starting point, or copy and paste my vimrc from below. Pay special attention to the pathogen infect line, you need that in order for pathogen to work.
set nocompatible set shiftwidth=2 set tabstop=2 set softtabstop=2 set expandtab set noswapfile if has("gui_running") colorscheme desert set guioptions=-m set guifont=Monospace\ 9 set columns=150 set lines=50 endif execute pathogen#infect()
And now install NERDTree.
$ cd ~/.vim/bundle $ git clone https://github.com/scrooloose/nerdtree.git