You are not logged in.

#1 2012-07-31 15:33:14

enricostn
Member
Registered: 2011-08-09
Posts: 57

[SOLVED] vim-ruby on ArchLinux

Hi,

I've installed vim-ruby with Vundle, but I just discovered that Vim on ArchLinux doesn't include ruby support.

so I need to use gVim because I don't know how to compile Vim with Ruby support... but gVim has Ruby from repository as dependency... while I've installed it using RVM...

how to solve this?

Anyone using vim-ruby on ArchLinux?

Thank you!

Last edited by enricostn (2012-08-13 14:01:23)

Offline

#2 2012-07-31 15:36:10

lunar
Member
Registered: 2010-10-04
Posts: 95

Re: [SOLVED] vim-ruby on ArchLinux

You can't.  You need to compile vim yourself in order to link it to a custom (i.e. rvm-installed) ruby.

Offline

#3 2012-07-31 16:03:15

enricostn
Member
Registered: 2011-08-09
Posts: 57

Re: [SOLVED] vim-ruby on ArchLinux

Hi,

thank you for your reply.

could you please point me on the right direction? It's the first time I need to compile a package by myself and in that "RVM" condition...

What are the steps that I have to follow?

thank you,

enricostn

Offline

#4 2012-08-01 07:09:30

lunar
Member
Registered: 2010-10-04
Posts: 95

Re: [SOLVED] vim-ruby on ArchLinux

Download the Vim sources, and read the compilation and installation instructions, or look at the source of the Arch packages.  In all this, you just to make sure that Vim picks the correct Ruby by setting the corresponding flags. The documentation tells you which flags, I don't know, for I have never compiled Vim myself.

Offline

#5 2012-08-01 09:42:11

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] vim-ruby on ArchLinux

Naah! Don't use upstream sources directly. Use the Arch Build System (ABS) and change the PKGBUILD accordingly from what is there in /var/abs/extra/vim.


To know or not to know ...
... the questions remain forever.

Offline

#6 2012-08-01 15:05:22

enricostn
Member
Registered: 2011-08-09
Posts: 57

Re: [SOLVED] vim-ruby on ArchLinux

ok,

but with ABS how I can point to the right Ruby version using RVM?

thank you for the hints!

Offline

#7 2012-08-12 00:21:31

dunric29a
Member
Registered: 2005-12-16
Posts: 23

Re: [SOLVED] vim-ruby on ArchLinux

  • fetch build files with

    abs extra/vim
  • edit PKGBUILD and add/replace

    --enable-rubyinterp

    option at

    configure

    script call

  • build package with

    makepkg -s

that's all. so simple and straightforward.

Offline

#8 2012-08-13 11:46:16

enricostn
Member
Registered: 2011-08-09
Posts: 57

Re: [SOLVED] vim-ruby on ArchLinux

Hi,

thank you for your time!

following your steps I get:

[enrico@archlap vim]$ makepkg -s
==> Making package: vim 7.3.600-1 (Mon Aug 13 13:30:12 CEST 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for inter-conflicts...

Targets (2): libyaml-0.1.4-2  ruby-1.9.3_p194-2

Total Installed Size:   20.27 MiB

Proceed with installation? [Y/n] n

but I already have Ruby installed via Ruby Version Manager, how could I avoid to install Ruby twice?

EDIT: I found this too but when I set --with-ruby-command=/home/enrico/.rvm/rubies/ruby-1.9.3-p194/bin/ruby make still ask me to install ruby from repos

Thank you,

enricostn

Last edited by enricostn (2012-08-13 13:20:27)

Offline

#9 2012-08-13 13:46:32

enricostn
Member
Registered: 2011-08-09
Posts: 57

Re: [SOLVED] vim-ruby on ArchLinux

Ok, it seems I got it!

using ABS, in the PKGBUILD:

1. delete 'ruby' from the makedepends array

2. add --enable-rubyinterp and --with-ruby-command=YOURRVMRUBYPATH to ./configure where YOURRVMRUBYPATH is the path of your current Ruby version (type which ruby in the shell)

then

makepkg -s

and

pacman -U packagename.pkg.tar.xz

now I will try to install properly Vim-Ruby...

EDIT: Yes it works too!

thank to all for the hints!

Last edited by enricostn (2012-08-13 14:00:43)

Offline

Board footer

Powered by FluxBB