Home » Forums » Command-T » VIM stopped working after installing Command-T even though Ruby 1.8.x is installed.
VIM stopped working after installing Command-T even though Ruby 1.8.x is installed.
I installed Command-T (command-t-0.8b.vba) on Linux Xubuntu 10.04 and now when I try to run VIM I get an error:
vim: symbol lookup error: /home/siddhion/.vim/ruby/command-t/ext.so: undefined symbol: rb_intern2
I understand this is a Ruby issue. Previously I only had Ruby 1.9.1 and found out that I need Ruby 1.8.x installed. So when I installed Ruby 1.8, restarted my laptop and tried to run VIM again, it still did not work.
How can I get Command-T working? If I can not then how can I uninstall Command-T?
Note how it is also using the system Ruby framework, so, no problems! If you can get the Ruby versions to match like this you should be fine. About the only other problem that could arise could be a 32-bit vs 64-bit discrepancy (ie. the -arch flags could be different), but that can be fixed too as seen in ticket #1604.
If you look at ticket #1604 you'll see that I would like to make this process easier, but it is tricky with so many platform variations. One idea I have is trying to get the plug-in to compile itself from inside Vim. If you look at extconf.rb you'll see that it boils down to:
have_header('ruby.h') or raise 'could not find ruby.h'
That part at least could be run fairly easy from inside Vim itself, and would hopefully ensure that the same version of Ruby gets used as Vim itself expects to be used. But then again, maybe not... There's not way to tell without trying it I guess.
so command-t will not work with out Ruby 1.8.7 being the chosen Ruby version. You see I am using RVM to be able to select between different versions of Ruby. I plan on developing in Ruby 1.9.1 primarily for some time.
So before I try to fix Command-T I should explain my situation a bit more in detail.
When I installed Command-T I had Ruby 1.9.1 as my main Ruby version. Then when I realized that I needed Ruby 1.8.x I installed it via command line. AFter that VIM still did not load. Then I tried installing RVM and 'rvm install 1.9.1' and 'rvm install 1.8.7'. I then did 'rvm use 1.8.7' and still VIM did not work. So to have Command -T really work, you are saying that I would need to have installed it when Ruby 1.8.7 was my main system Ruby version?
Thank you, Adam
So you are saying that before I install Command-T that I will need Ruby 1.8.7 to be my system Ruby version?
Will using RVM to switch to Ruby 1.9.1 affect the ability to use Command-T and VIM even if Ruby 1.8.7 is my system Ruby version?
You just need to ensure that the version of Ruby you use to build the Command-T extension is the same version that was used when Vim was built. Once you've built the extension you can do whatever you want with your system Ruby. Vim doesn't care about your system Ruby, it only cares about the one it was built against (which most likely was 1.8).
As for Ruby 1.9 specifically, Command-T itself is compatible with it. Early on I had a couple of people report incompatibilities with it and they were fixed.
The main issue is that Vim itself doesn't yet officially support 1.9; there are some patches for it floating around and it can be done, but it's not official yet. 7.3 is apparently coming out soon and we'll see if those patches have been accepted (I don't know as I don't follow the official Vim repo).
You might have a version of Vim on your system that's linked against 1.9, but if you do, it's because you, or some package maintainer upstream, jumped through hoops patching Vim to get it to work.
So specifically, your first task is to find out what version of Ruby your copy of Vim is linked against. As noted above, what do :ruby p RUBY VERSION and :version print out from inside Vim? Once you know that, you have to build the extension under the same environment.
So you can see in there there it was built and linked with these flags:
Which I presume is the standard, system Ruby. So when you compile the Command-T extension, you should either remove all the RVM stuff from your PATH or tell RVM to use the system Ruby before you do the build. If you get it right you'll see in the make output that the library paths match the ones used by Vim.
Let me know how you go with it. If it doesn't work, please paste in the output so we can inspect it.
Yes I see this but can't believe it since I installed Ruby 1.8.x after installing VIM. Before installing Ruby I had Ruby 1.9.1 installed. Could it be that Ruby 1.8 was pre-installed with my Xubuntu 10.04 OS I wonder.
In anycase, I will tell RVM to use system ruby and then re-install Command-T.
If I find out that my system Ruby build is 1.9.1 I will come back here and tell you.
If I find out that my system Ruby build is 1.8 I will go ahead with building and if there is error I shall post the output.
for non rvm users
reinstall command-t using ruby1.8 compiler this time