简体   繁体   English

我应该在Windows上使用哪个版本的Ruby与Vim 7.4?

[英]Which version of Ruby should I use with Vim 7.4 on Windows?

I have Ruby version "1.9.3p362 (2012-12-25) [i386-mingw32]" installed. 我安装了Ruby版“1.9.3p362(2012-12-25)[i386-mingw32]”。 It has msvcrt-ruby191.dll in the bin directory. 它在bin目录中有msvcrt-ruby191.dll Vim 7.3 could use that, at least has('ruby') returned 1. (Some plugins, like LustyJuggler did not work, but I don't know why.) But now with Vim 7.4, it does not work anymore. Vim 7.3可以使用它,至少has('ruby')返回1.(有些插件,如LustyJuggler不起作用,但我不知道为什么。)但是现在使用Vim 7.4,它不再起作用了。 gvim.exe (in 7.4) references msvcrt-ruby192.dll (note the "192"). gvim.exe(在7.4中)引用了msvcrt-ruby192.dll (注意“192”)。 But even Ruby 1.9.3 has msvcrt-ruby191.dll in it, as I said. 但正如我所说,即使是Ruby 1.9.3也有msvcrt-ruby191.dll

I tried renaming msvcrt-ruby191.dll to msvcrt-ruby192.dll but that resulted in a LoadError: Incompatible library version . 我尝试将msvcrt-ruby191.dll重命名为msvcrt-ruby192.dll但这导致了一个LoadError: Incompatible library version

I'm surprised I was not able to find people having this problem when I tried to look for solutions. 当我试图寻找解决方案时,我很惊讶我找不到有这个问题的人。

My goal is to get LustyJuggler to work. 我的目标是让LustyJuggler工作。

I read about the issue here http://hynek.me/articles/vim-7-3-on-win32/ and downloaded a version that was compiled for Ruby 2 from http://wyw.dcweb.cn/ . 我在http://hynek.me/articles/vim-7-3-on-win32/上阅读了这个问题,并从http://wyw.dcweb.cn/下载了为Ruby 2编译的版本。 Works great. 效果很好。

I didn't find any better (or more easy) solution than to edit gvim.exe and replace all references to msvcrt-ruby192.dll to msvcrt-ruby191.dll . 我找不到比编辑gvim.exe更好(或更简单)的解决方案,并将对msvcrt-ruby192.dll所有引用替换为msvcrt-ruby191.dll Now it works without any issues. 现在它没有任何问题。

This worked for me. 这对我有用。

Go there: 去那里:

http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html

Download ruby-1.9.2-XXX-i386-mswin32.zip package. 下载ruby-1.9.2-XXX-i386-mswin32.zip包。 Extract it somewhere and add the \\bin subdirectory of the package to your windows PATH. 将其解压缩到某处并将包的\\ bin子目录添加到Windows PATH中。

Download readline http://gnuwin32.sourceforge.net/packages/readline.htm , install it. 下载readline http://gnuwin32.sourceforge.net/packages/readline.htm ,安装它。 Copy readline5.dll and put it in the \\bin directory. 复制readline5.dll并将其放在\\ bin目录中。 Rename it to readline.dll 将其重命名为readline.dll

Rename msvcrt-ruby191.dll to msvcrt-ruby192.dll in the bin directory. 将msvcrt-ruby191.dll重命名为bin目录中的msvcrt-ruby192.dll。

It's an ugly procedure but seems to work for me. 这是一个丑陋的程序,但似乎对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM