sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \
python3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git
rvm use 2.2
# 'system' in place of 2.2 will likely suffice as well
#!/bin/bash
\# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
\# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
\# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
fi
rvm system
echo `which ruby`
repo=/tmp/vim_python2_sys_ruby
rm -rf "$repo"
git clone https://github.com/vim/vim "$repo"
cd "$repo"
./configure \
--enable-perlinterp \
--enable-pythoninterp \
--enable-rubyinterp
--with-ruby-command=/home/dmmmd/.rvm/rubies/ruby-2.2.6/bin/ruby \
--enable-cscope
--enable-gui=auto \
--enable-gtk2-check \
--enable-gnome-check \
--with-features=huge
--enable-multibyte \
--with-x \
--with-compiledby="xorpd"
--with-python2-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/
--prefix=/opt/vim8.0p2
make VIMRUNTIMEDIR= /opt/vim8.0p2
cd "$repo"/src
make test
cd /tmp/"$repo"
for python 3 support replace the relevant line above
--with-python3-config-dir=/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu/
--with-ruby-command indicates which ruby binary you want vim to use. It must exist. I had no luck with version = 2.3
There is an issue filed on GitHub
Even though you might set the binary to something like the above, vim won't properly compile unless the env ruby is the system one.
rvm use system
If you want to set the ruby version in a bash script, this must appear first in the script before rvm will function.
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
\# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
\# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
fi