开发者

Macvim and rails.vim on rails 3 rc - Uninitialized constant Bundler (NameError)

开发者 https://www.devze.com 2023-01-10 18:30 出处:网络
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.

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 "Unini开发者_运维知识库tialized 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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消