# Ruby in vim throws an error

**URL:** <https://www.ruby-forum.com/t/ruby-in-vim-throws-an-error/165635>\
**Category:** Ruby\
**Created:** [April 15, 2009, 11:34pm UTC](https://www.ruby-forum.com/t/ruby-in-vim-throws-an-error/165635 "2009-04-15T23:34:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![devbanana](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Post date:** [April 15, 2009, 11:34pm UTC](https://www.ruby-forum.com/t/ruby-in-vim-throws-an-error/165635/1 "2009-04-15T23:34:42Z")

</div>

Hi,

I wasn’t sure where else to post this. I just installed the Ruby  
configuration files for vim, from [http://vim-ruby.rubyforge.org/](http://vim-ruby.rubyforge.org/).

When I enable indentation like:

filetype plugin indent on

When I open a .rb file, it gives an error about not being able to open  
some file in /tmp. It references line 81 of ftplugin/ruby.vim, which is:

```
  let s:rubypath = system("ruby -e '" . s:code . "'")

```

A few lines earlier, s:code is assigned as:

```
let s:code = "print ($: + begin; require %q{rubygems};

```

Gem.all\_load\_paths.sort.uniq; rescue LoadError; []; end).join(%q{,})"

I’m rather new to vim, so don’t know enough about this to know more  
about what’s going on.

I’m on vim 7.1, ruby 1.8.7 if it’s relevant, and running it on Cygwin  
1.5.25.

Thanks,  
Brandon
