You can take a look at ruby's extension for vim (and at vim by itself if you
are not using it as an editor yet).
http://www.vim.org
You should try the latest 6.0 alpha version since there where some
interesting changes in the way the ruby
interpretor is embedded, it now dynamically load the ruby lib if present in
the system and just do not allow
any ruby script to run but continue when it is not present.
Benoit