views:

296

answers:

2

Configured vim and gvim on Windows, as well as vim and macvim on OSX. Intend to learn rails 3, so installed rails 3 rc on both OS'ses. So far, so good.

When using macvim, each and every script execution offered by rails.vim gives me errors "Uninitialized constant Bundler (NameError)". Tried :Rserver, :Rgenerate, .... However, staying on OSX, when firing up vim from a terminal window, rails.vim runs just fine, as well as execution of the rails script from the terminal directly.

So somewhere, somehow my macvim configuration seems to mess things up. However, unless I'm mistaken, it simply uses the settings from the .vimrc and .gvimrc files. Now, the .gvimrc is really minimalistic, so I might just as well add it here:


set guifont=Inconsolata:h17 " Font family and font size. set antialias " MacVim: smooth fonts. set encoding=utf-8 " Use UTF-8 everywhere. set guioptions-=T " Hide toolbar. " set background=light " Background. set lines=40 columns=100 " Window dimensions.

set guioptions-=r " Don't show right scrollbar


Any suggestion on how to solve this would be appreciated.

A: 

Your $PATH may not be set correctly in MacVim, or perhaps something else is missing from your environment?

Try starting a shell from MacVim using :shell and run the ruby commands manually to see if you get the same error. You could also try comparing environment variables between MacVim and Terminal vim using :new | read !env in each.

too much php
I do get the same error via the shell. Issuing a printenv command from the shell from Vim / MacVim reveals e.g. different settings for VIMRUNTIME and VIM: MacVim gets them from the MacVim.app package, while Vim gets them from usr/share/vim ...
sergevm
Besides that, I see mainly differences in the fact that settings for RVM are not reflected in the settings displayed when issuing the command via MacVim, and the fact that the PATH specification is only a fraction of the "regular" one.
sergevm
A: 

Version 7.3 of Vim was released yesterday. Checked, and a new version of MacVim was already built, based on this latest Vim release. Downloaded and tested, and rails.vim scripts work the way they are supposed to now! So issue solved.

sergevm