Cygwin: Installing vim with ruby support
Ruby support fixed in Cygwin ViM: vim-8.0.1486-1.
You should also have the latest ruby
installed: ruby-2.3.6,
and also do not forget to rebuild the dynamic library for command-t.
Note: You can find the discussion on the cygwin mailing list here.
Which Ruby does Vim use for :ruby commands?
All this depends on Vim build configuration. :ver
output may indicate the following:
-lang
interface for "lang" wasn't compiled at all;+lang
everything was statically linked into Vim executable;+lang/dyn
interface was linked against dynamic library (dll/so)
If it's linked dynamically then the library will be searched and loaded on demand by option value (e.g. :h 'rubydll'
). In this case it may point to any installation you want. (Although -DRUBY_VERSION=XX
specified at compile-time may still be relevant and Vim may fail to load mismatched library).
Installing Vim with the Ruby Interpreter
You just need to install ruby header files first. Like this:
sudo apt-get install ruby-dev
./configure --enable-rubyinterp
Can I set Vim's 'embedded' ruby path?
Yes, but you'll have to recompile Vim. Vim will compile against whatever Ruby is first in your $PATH
at compile time, so you should just be able to download the source and run:
./configure --enable-rubyinterp # + other options you want
make
make install
If you're on OS X using Homebrew, you may wish to just brew install vim
or brew install macvim --override-system-vim
.
How to change vim ruby version
Try the following:
$ cd ~/.vim/bundle/command-t/ruby/command-t/
$ rbenv local system
$ ruby extconf.rb
$ make clean
$ make
Taken from this post. I've had this problem before and these steps worked for me.
Install Ruby support for VIM on Mac OS X
While it's possible to build and install your own Vim to replace the pre-installed version, I don't recommend it. It's far easier to just use MacVim instead:
http://code.google.com/p/macvim/
MacVim is a very Mac-friendly version of Vim, and it's got Ruby support already built in. It can be used as both a GUI and Terminal application. (Check out :help macvim-start
from within MacVim for details.)
Related Topics
Can You Ask Ruby to Treat Warnings as Errors
Ruby Method Lookup Path For an Object
Using Www:Mechanize to Download a File to Disk Without Loading It All in Memory First
List of Ruby Operators That Can Be Overridden/Implemented
Ruby on Rails Best Practices - Big Controller VS Small Controller
Why Are Symbols in Ruby Not Thought of as a Type of Variable
How to Avoid Nomethoderror For Nil Elements When Accessing Nested Hashes
What Does the "||=" Operand Stand for in Ruby
Is This the Best Way to Unescape Unicode Escape Sequences in Ruby
How to Use the Debugger with Ruby 2.0
The Class/Object Paradox Confusion
Installing Rvm (Ruby Version Manager)
In Ruby on Rails, Are '#Encoding: Utf-8' and 'Config.Encoding = "Utf-8"' Different
Rails: Specified 'Mysql2' for Database Adapter But the Gem Is Not Loaded