Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In Arch Linux, apparently gvim requires to install ruby as a dependency. However, if I want to work with RVM, then I don't need the binary ruby installed.

Can that cause problems? Can ruby be removed and gvim configured to use the RVM version of ruby that's installed?

Note that trying sudo pacman -Rs ruby outputs an error:

error: failed to prepare transaction (could not satisfy dependencies)
:: gvim: requires ruby

Any tips?

share|improve this question
1  
I'm not sure why you would care whether or not the ruby binary is installed (seeing as how RVM "allows you to easily install, manage, and work with multiple ruby environments"). Presumably the dependancy is for scripting vim itself (it probably has perl and python as dependencies too) and that the compiled parts of gvim should work with whatever ruby is available to it...so go ahead and try! –  goldilocks Jul 16 '13 at 13:16

2 Answers 2

up vote 2 down vote accepted

Option #1

You'll need to recompile gvim to remove the requirement. It's configurable when building it.

This post I wrote on my blog shows how to compile Ruby support in, but you could just as easily remove it. NOTE: this post is Fedora/RHEL specific so it's not a template of steps for you to follow, but just to show you that it is possible to recompile gvim with/without Ruby support if you so choose.

Incidentally I think the issue you're running into is that the package manger knows that gvim "requires" and is enforcing this when you try to remove it.

Option #2

You could override the package manager and "force" the removal if you know no other packages require it.

Option #3

A 3rd options would be to install the Ruby package, and RVM. When you setup RVM you're overriding your $PATH, so RVM's versions of Ruby are the precedent, even though you have Ruby installed as a package on the system.

So your RVM's Ruby should be the one that gvim is using anyways.

For example:

$ echo $PATH
/home/saml/apps/perl5/perlbrew/bin:/home/saml/apps/perl5/perlbrew/perls/perl-5.14.0/bin:/home/saml/.rvm/gems/ruby-1.9.2-p180/bin:/home/saml/.rvm/gems/ruby-1.9.2-p180@global/bin:/home/saml/.rvm/rubies/ruby-1.9.2-p180/bin:/home/saml/.rvm/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/brlcad/bin:/home/saml/bin:/usr/brlcad/bin

$ which ruby
~/.rvm/rubies/ruby-1.9.2-p180/bin/ruby

Here you can see that when ruby is invoked, my RVM version is the one getting picked up. Unless vim/gvim has the path to ruby hardcoded (I doubt this) then it's bound by the same search through your $PATH, so it will find the RVM ruby too.

share|improve this answer
    
I'd go with option 3 and use the distro gvim. Compiling it from source can be a little painstaking WRT the X dependencies (here's my note about it tho, verbatim: "Intrinsic.h in libxt; imake (make for X11); libxpm". The .configure script is not that friendly ;) –  goldilocks Jul 16 '13 at 13:18
    
@goldilocks - thanks, I use option #3 as well, every day. –  slm Jul 16 '13 at 13:55

You can use Arch's ABS (Arch Build System) to reconfigure the gvim package and remove the Ruby dependency. The Arch Wiki has a pretty detailed page about the ABS.

Once you've done that, you'll probably want to add IgnorePkg = gvim to your /etc/pacman.conf file to prevent pacman from overwriting your customised version the next time you update the system.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.