Installing vim with ruby support (+ruby)

Viewed 59692

I'm trying to get command-t installed for vim but my current version of vim doesn't have the (+ruby) flag. The command "which ruby" shows that ruby is installed.

What do I need to do in order to activate the +ruby flag in vim?

Also, what does the +ruby flag technically mean?

13 Answers

Some package provides vim-ruby on Ubuntu, for example vim-nox.

simply:

sudo apt-get install vim-nox;

will get you vim with ruby, as well as compiled in "support for scripting with Perl, Python, Ruby, and TCL but no GUI."

sudo apt-get install vim-rails

will install a "selection of vimscripts that make editing Ruby on Rails applications extremely easy." but as it depends on vim-full and vim-addon-manager, it will also install the vim-gnome version of the GUI, that is "a version of vim compiled with a GNOME2 GUI and support for scripting with Perl, Python, Ruby, and TCL."

On Mac OS X, I find that the easiest is to install MacVim with brew install macvim which includes +ruby. And then symlink /usr/local/bin/vim to /usr/local/bin/mvim. That way to get a recent Vim version, with the huge feature set, +ruby, both GUI and command line vim just using the standard HomeBrew repository. No need for external repository like in Pierre answer

To avoid issues it's better to use the use the system ruby during installation so:

rvm use system
brew install macvim
ln -s /usr/local/bin/mvim /usr/local/bin/vim
Related