Seg fault on Command-T #215

Closed
benmoss opened this Issue Jul 6, 2011 · 41 comments

Comments

Projects
None yet
@benmoss

benmoss commented Jul 6, 2011

This is somewhat identical to #109 but that issue is closed and I can't reopen it. I'm on Snow Leopard.

Open a project, hit cmd-T, and it crashes and in console reports

Vim: Caught deadly signal SEGV
Vim: Finished.
121H3;0M                               
Error detected while processing function <SNR>63_NetrwBookHistSave:
line    8:
E36: Not enough room

I tried @danboy's solution in that thread and it stopped mvim from crashing on load, but cmd-T still crashes.

@rainerborene

This comment has been minimized.

Show comment
Hide comment
@rainerborene

rainerborene Jul 6, 2011

Go to the command-t folder and type: git checkout 1.2.1.

Go to the command-t folder and type: git checkout 1.2.1.

@benmoss

This comment has been minimized.

Show comment
Hide comment
@benmoss

benmoss Jul 6, 2011

error: pathspec 'ruby/command-t/1.2.1' did not match any file(s) known to git.

benmoss commented Jul 6, 2011

error: pathspec 'ruby/command-t/1.2.1' did not match any file(s) known to git.
@CodeOfficer

This comment has been minimized.

Show comment
Hide comment
@CodeOfficer

CodeOfficer Jul 12, 2011

The Janus/Command-T plugin has been busted for a long time now if using 1.9.2 as your default ruby. I can usually at least get MacVim to start up again by cd'ing into ~/.vim/ruby/command-t and running 'ruby extconf.rb && make' but that doesn't fix the plugin.

The Janus/Command-T plugin has been busted for a long time now if using 1.9.2 as your default ruby. I can usually at least get MacVim to start up again by cd'ing into ~/.vim/ruby/command-t and running 'ruby extconf.rb && make' but that doesn't fix the plugin.

@benmoss

This comment has been minimized.

Show comment
Hide comment
@benmoss

benmoss Jul 16, 2011

I believe the solution to this is to compile Command-T with 1.8.7

benmoss commented Jul 16, 2011

I believe the solution to this is to compile Command-T with 1.8.7

@benmoss benmoss closed this Jul 16, 2011

@CodeOfficer

This comment has been minimized.

Show comment
Hide comment
@CodeOfficer

CodeOfficer Jul 16, 2011

Been there, done that, doesn't work still.

Been there, done that, doesn't work still.

@benmoss benmoss reopened this Jul 16, 2011

@pivotal-casebook

This comment has been minimized.

Show comment
Hide comment
@pivotal-casebook

pivotal-casebook Jul 21, 2011

You need to make sure that the version of ruby you compiled your vim/macvim binary with matches.

So for instance:

$ rvm use system
$ brew install macvim
(compile command-t also using system ruby)

any mismatch will cause segfaults.

See the note here: http://www.vim.org/scripts/script.php?script_id=3025

Note that Command-T requires a version of VIM with Ruby support enabled, and it must be compiled using the same version of Ruby that Vim itself links against. For more details see the documentation:

I would close this out as not a bug to be fixed in command-t. Might be nice if the makefile detected what version of ruby your vim was built against though.

You need to make sure that the version of ruby you compiled your vim/macvim binary with matches.

So for instance:

$ rvm use system
$ brew install macvim
(compile command-t also using system ruby)

any mismatch will cause segfaults.

See the note here: http://www.vim.org/scripts/script.php?script_id=3025

Note that Command-T requires a version of VIM with Ruby support enabled, and it must be compiled using the same version of Ruby that Vim itself links against. For more details see the documentation:

I would close this out as not a bug to be fixed in command-t. Might be nice if the makefile detected what version of ruby your vim was built against though.

@CodeOfficer

This comment has been minimized.

Show comment
Hide comment
@CodeOfficer

CodeOfficer Jul 21, 2011

Thanks for the insight! Sounds like this may address the issue. I'll check it out later today.

Thanks for the insight! Sounds like this may address the issue. I'll check it out later today.

@mikesells

This comment has been minimized.

Show comment
Hide comment
@mikesells

mikesells Jul 25, 2011

pivotal-casebook's instructions fixed it for me. Thanks!

pivotal-casebook's instructions fixed it for me. Thanks!

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Aug 4, 2011

I did the whole install from system, but now it randomly crashes, sometimes with "ILL" and sometimes with "SEGV".

ghost commented Aug 4, 2011

I did the whole install from system, but now it randomly crashes, sometimes with "ILL" and sometimes with "SEGV".

@philipkobernik

This comment has been minimized.

Show comment
Hide comment
@philipkobernik

philipkobernik Aug 5, 2011

pivotal-casebook's instructions worked for me as well. Thanks!

pivotal-casebook's instructions worked for me as well. Thanks!

@dx7

This comment has been minimized.

Show comment
Hide comment
@dx7

dx7 Aug 29, 2011

Contributor

perfect explanation from pivotal-casebook. Thanks!

Contributor

dx7 commented Aug 29, 2011

perfect explanation from pivotal-casebook. Thanks!

@philtr

This comment has been minimized.

Show comment
Hide comment
@philtr

philtr Oct 5, 2011

+1 to @pivotal-casebook's solution. Thanks!

philtr commented Oct 5, 2011

+1 to @pivotal-casebook's solution. Thanks!

@fphilipe

This comment has been minimized.

Show comment
Hide comment
@fphilipe

fphilipe Oct 6, 2011

@pivotal-casebook's solution worked, but calling mvim only works when I'm on the system ruby, else I get the SEGV when launching. Any solution for this?

fphilipe commented Oct 6, 2011

@pivotal-casebook's solution worked, but calling mvim only works when I'm on the system ruby, else I get the SEGV when launching. Any solution for this?

@madtrick

This comment has been minimized.

Show comment
Hide comment
@madtrick

madtrick Nov 26, 2011

I would like to suggest to change the code used to install command_t plugin.

Why?
When I installed MacVim I was using ruby1.9.2 as my choice, so vim was compiled against it. Now, when I use Janus and install command_t with it I got a SEG_FAULT error when running Vim. That's because of the following.

This is the code shipped with janus used to install command_t

vim_plugin_task "command_t",        "http://s3.wincent.com/command-t/releases/command-t-1.2.1.vba" do
  Dir.chdir "ruby/command-t" do
    if File.exists?("/usr/bin/ruby1.8") # prefer 1.8 on *.deb systems
      sh "/usr/bin/ruby1.8 extconf.rb"
    elsif File.exists?("/usr/bin/ruby") # prefer system rubies
      sh "/usr/bin/ruby extconf.rb"
    elsif `rvm > /dev/null 2>&1` && $?.exitstatus == 0
      sh "rvm system ruby extconf.rb"
    elsif `rbenv > /dev/null 2>&1` && $?.exitstatus == 0
      sh "RBENV_VERSION=system ruby extconf.rb"
    end
    sh "make clean && make"
  end
end

When this code is run it looks for versions of ruby installed on the system. First looks for systemwide installations

    if File.exists?("/usr/bin/ruby1.8") # prefer 1.8 on *.deb systems
      sh "/usr/bin/ruby1.8 extconf.rb"
    elsif File.exists?("/usr/bin/ruby") # prefer system rubies
      sh "/usr/bin/ruby extconf.rb"

And if none of that exists then it looks for rvm or rbenv:

    if `rvm > /dev/null 2>&1` && $?.exitstatus == 0
      sh "rvm system ruby extconf.rb"
    elsif `rbenv > /dev/null 2>&1` && $?.exitstatus == 0
      sh "RBENV_VERSION=system ruby extconf.rb"

This order (first systemwide then rvm or rbenv) causes on my system command_t to be compiled with "/usr/bin/ruby" which is ruby1.8.7 rather than with ruby1.9.2 which is managed by rvm. This results in a SEG FAULT when running vim.

So, What's what I suggest?

I suggest checking before for rvm and rbenv and if they fail, then go for systemwide rubies. Like this:

vim_plugin_task "command_t",        "http://s3.wincent.com/command-t/releases/command-t-1.2.1.vba" do
  Dir.chdir "ruby/command-t" do
    if `rvm > /dev/null 2>&1` && $?.exitstatus == 0
      sh "rvm system ruby extconf.rb"
    elsif `rbenv > /dev/null 2>&1` && $?.exitstatus == 0
      sh "RBENV_VERSION=system ruby extconf.rb"
    elsif File.exists?("/usr/bin/ruby1.8") # prefer 1.8 on *.deb systems
      sh "/usr/bin/ruby1.8 extconf.rb"
    elsif File.exists?("/usr/bin/ruby") # prefer system rubies
      sh "/usr/bin/ruby extconf.rb"
    end
    sh "make clean && make"
  end
end

I would like to suggest to change the code used to install command_t plugin.

Why?
When I installed MacVim I was using ruby1.9.2 as my choice, so vim was compiled against it. Now, when I use Janus and install command_t with it I got a SEG_FAULT error when running Vim. That's because of the following.

This is the code shipped with janus used to install command_t

vim_plugin_task "command_t",        "http://s3.wincent.com/command-t/releases/command-t-1.2.1.vba" do
  Dir.chdir "ruby/command-t" do
    if File.exists?("/usr/bin/ruby1.8") # prefer 1.8 on *.deb systems
      sh "/usr/bin/ruby1.8 extconf.rb"
    elsif File.exists?("/usr/bin/ruby") # prefer system rubies
      sh "/usr/bin/ruby extconf.rb"
    elsif `rvm > /dev/null 2>&1` && $?.exitstatus == 0
      sh "rvm system ruby extconf.rb"
    elsif `rbenv > /dev/null 2>&1` && $?.exitstatus == 0
      sh "RBENV_VERSION=system ruby extconf.rb"
    end
    sh "make clean && make"
  end
end

When this code is run it looks for versions of ruby installed on the system. First looks for systemwide installations

    if File.exists?("/usr/bin/ruby1.8") # prefer 1.8 on *.deb systems
      sh "/usr/bin/ruby1.8 extconf.rb"
    elsif File.exists?("/usr/bin/ruby") # prefer system rubies
      sh "/usr/bin/ruby extconf.rb"

And if none of that exists then it looks for rvm or rbenv:

    if `rvm > /dev/null 2>&1` && $?.exitstatus == 0
      sh "rvm system ruby extconf.rb"
    elsif `rbenv > /dev/null 2>&1` && $?.exitstatus == 0
      sh "RBENV_VERSION=system ruby extconf.rb"

This order (first systemwide then rvm or rbenv) causes on my system command_t to be compiled with "/usr/bin/ruby" which is ruby1.8.7 rather than with ruby1.9.2 which is managed by rvm. This results in a SEG FAULT when running vim.

So, What's what I suggest?

I suggest checking before for rvm and rbenv and if they fail, then go for systemwide rubies. Like this:

vim_plugin_task "command_t",        "http://s3.wincent.com/command-t/releases/command-t-1.2.1.vba" do
  Dir.chdir "ruby/command-t" do
    if `rvm > /dev/null 2>&1` && $?.exitstatus == 0
      sh "rvm system ruby extconf.rb"
    elsif `rbenv > /dev/null 2>&1` && $?.exitstatus == 0
      sh "RBENV_VERSION=system ruby extconf.rb"
    elsif File.exists?("/usr/bin/ruby1.8") # prefer 1.8 on *.deb systems
      sh "/usr/bin/ruby1.8 extconf.rb"
    elsif File.exists?("/usr/bin/ruby") # prefer system rubies
      sh "/usr/bin/ruby extconf.rb"
    end
    sh "make clean && make"
  end
end
@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Nov 27, 2011

Member

This has already been taken care of in the experimental branch, short version: make sure you are using system ruby and not one installed via rvm or rbenv before compiling MacVim (which you should install via Homebrew c.f the Readme) and use the same ruby when running rake

Member

kalbasit commented Nov 27, 2011

This has already been taken care of in the experimental branch, short version: make sure you are using system ruby and not one installed via rvm or rbenv before compiling MacVim (which you should install via Homebrew c.f the Readme) and use the same ruby when running rake

@kalbasit kalbasit closed this Nov 27, 2011

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

I still get a segfault on the experimental branch running mvim. I installed with the system ruby as per the instructions, but when I switch back to 1.9.3, mvim segfaults.

dudleyf commented Dec 3, 2011

I still get a segfault on the experimental branch running mvim. I installed with the system ruby as per the instructions, but when I switch back to 1.9.3, mvim segfaults.

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

How did you install MacVIm ?

Member

kalbasit commented Dec 3, 2011

How did you install MacVIm ?

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

rvm use system
brew install macvim

dudleyf commented Dec 3, 2011

rvm use system
brew install macvim
@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

ok and after that, did you re-compile command-t ? Try

cd ~/.vim
rm -rf janus/vim/tools/command-t
git checkout HEAD -- janus/vim/tools/command-t
rake
Member

kalbasit commented Dec 3, 2011

ok and after that, did you re-compile command-t ? Try

cd ~/.vim
rm -rf janus/vim/tools/command-t
git checkout HEAD -- janus/vim/tools/command-t
rake
@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Also make sure that rvm has parsed .rvmrc before running rake like I showed above, you can see that by running rvm use in the ~/.vim folder

Member

kalbasit commented Dec 3, 2011

Also make sure that rvm has parsed .rvmrc before running rake like I showed above, you can see that by running rvm use in the ~/.vim folder

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

Same result, segfault after switching back to 1.9.

dudleyf commented Dec 3, 2011

Same result, segfault after switching back to 1.9.

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Very weird I never had this issue even after following this

/cc @adrianrego

Member

kalbasit commented Dec 3, 2011

Very weird I never had this issue even after following this

/cc @adrianrego

@kalbasit kalbasit reopened this Dec 3, 2011

@adrianrego

This comment has been minimized.

Show comment
Hide comment
@adrianrego

adrianrego Dec 3, 2011

Member

That is weird. Are you using the latest version of RVM and the macvim formula in homebrew?

Member

adrianrego commented Dec 3, 2011

That is weird. Are you using the latest version of RVM and the macvim formula in homebrew?

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

rvm 1.10.0-pre and brew updated this morning.

dudleyf commented Dec 3, 2011

rvm 1.10.0-pre and brew updated this morning.

@adrianrego

This comment has been minimized.

Show comment
Hide comment
@adrianrego

adrianrego Dec 3, 2011

Member

i'd try removing macvim and walking through each step of the process making sure along the way that rvm is using the system ruby.

cd ~ brew remove macvim brew cleanup rvm use system brew install macvim git clone -b experimental git://github.com/carlhuda/janus.git .vim cd .vim rvm use system rake

Member

adrianrego commented Dec 3, 2011

i'd try removing macvim and walking through each step of the process making sure along the way that rvm is using the system ruby.

cd ~ brew remove macvim brew cleanup rvm use system brew install macvim git clone -b experimental git://github.com/carlhuda/janus.git .vim cd .vim rvm use system rake

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

Nope. Same thing. Is there any way to see which Ruby macvim was compiled with?

dudleyf commented Dec 3, 2011

Nope. Same thing. Is there any way to see which Ruby macvim was compiled with?

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Yes there is, I'm not using Mac, so make sure to get the correct path of the macvim binary, I would go for brew prefix macvim Also make sure there's no MacVim.app in your /Applications and ~/Applications folders

ldd /path/to/vim | grep ruby
Member

kalbasit commented Dec 3, 2011

Yes there is, I'm not using Mac, so make sure to get the correct path of the macvim binary, I would go for brew prefix macvim Also make sure there's no MacVim.app in your /Applications and ~/Applications folders

ldd /path/to/vim | grep ruby
@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

It's spelled otool -L on the Mac, but it does show it's using the system Ruby:

dudley@kima macvim/7.3-63 :> otool -L MacVim.app/Contents/MacOS/Vim | grep ruby
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.7)

dudleyf commented Dec 3, 2011

It's spelled otool -L on the Mac, but it does show it's using the system Ruby:

dudley@kima macvim/7.3-63 :> otool -L MacVim.app/Contents/MacOS/Vim | grep ruby
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.7)
@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

and where is this MacVim.app ? is it in /Applications or ~/Applications

Member

kalbasit commented Dec 3, 2011

and where is this MacVim.app ? is it in /Applications or ~/Applications

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

It's in /usr/local/Cellar/macvim/7.3-63/MacVim.app. There are no other MacVims in /Applications or ~/Applications

dudleyf commented Dec 3, 2011

It's in /usr/local/Cellar/macvim/7.3-63/MacVim.app. There are no other MacVims in /Applications or ~/Applications

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Okay so the MacVim is good, now try finding out which version Command-T is compiled with, here's the output on my archlinux box (which uses Ruby 1.9.3 as system-wide ruby)

$ ldd ~/.vim/janus/vim/tools/command-t/ruby/command-t/ext.so
        linux-vdso.so.1 =>  (0x00007fff2a8f9000)
        libruby.so.1.9 => /usr/lib/libruby.so.1.9 (0x00007f8ed7c9e000)
        libc.so.6 => /lib/libc.so.6 (0x00007f8ed7917000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f8ed76f9000)
        librt.so.1 => /lib/librt.so.1 (0x00007f8ed74f1000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f8ed72ed000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f8ed70b5000)
        libm.so.6 => /lib/libm.so.6 (0x00007f8ed6e33000)
        /lib/ld-linux-x86-64.so.2 (0x00007f8ed82e3000)

Notice where the ruby points ? So on my system both vim and command-t uses the same ruby version, if you're in the same situation then I start looking for something else causing the Segfault, @adrianrego you agree ?

Member

kalbasit commented Dec 3, 2011

Okay so the MacVim is good, now try finding out which version Command-T is compiled with, here's the output on my archlinux box (which uses Ruby 1.9.3 as system-wide ruby)

$ ldd ~/.vim/janus/vim/tools/command-t/ruby/command-t/ext.so
        linux-vdso.so.1 =>  (0x00007fff2a8f9000)
        libruby.so.1.9 => /usr/lib/libruby.so.1.9 (0x00007f8ed7c9e000)
        libc.so.6 => /lib/libc.so.6 (0x00007f8ed7917000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f8ed76f9000)
        librt.so.1 => /lib/librt.so.1 (0x00007f8ed74f1000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007f8ed72ed000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f8ed70b5000)
        libm.so.6 => /lib/libm.so.6 (0x00007f8ed6e33000)
        /lib/ld-linux-x86-64.so.2 (0x00007f8ed82e3000)

Notice where the ruby points ? So on my system both vim and command-t uses the same ruby version, if you're in the same situation then I start looking for something else causing the Segfault, @adrianrego you agree ?

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

Yep, looks like command-t is using the same ruby:

dudley@kima ~/.vim :> otool -L ~/.vim/janus/vim/tools/command-t/ruby/command-t/ext.bundle                                     experimental//
/Users/dudley/.vim/janus/vim/tools/command-t/ruby/command-t/ext.bundle:
        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.7)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

dudleyf commented Dec 3, 2011

Yep, looks like command-t is using the same ruby:

dudley@kima ~/.vim :> otool -L ~/.vim/janus/vim/tools/command-t/ruby/command-t/ext.bundle                                     experimental//
/Users/dudley/.vim/janus/vim/tools/command-t/ruby/command-t/ext.bundle:
        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.7)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Do you have any custom plugin installed ?

Please try this

cd ~/.vim
for submodule in `git submodule | grep -v core | awk '{print $2}'`; do
  echo "call janus#disable_plugin('`basename ${submodule}`')" >> ~/.vimrc.before;
done

The command above will disable every plugin provided by Janus except the core (which is pathogen and settings, which I'm sure won't be causing any segfaults) if MacVim did start without problems try removing plugins from ~/.vimrc.before one by one and starting MacVim afterwards so you could narrow down the problem, start with command-t, if you enable command-t and macvim starts then it is not the source of the problem and you should continue on to the next plugin.

Member

kalbasit commented Dec 3, 2011

Do you have any custom plugin installed ?

Please try this

cd ~/.vim
for submodule in `git submodule | grep -v core | awk '{print $2}'`; do
  echo "call janus#disable_plugin('`basename ${submodule}`')" >> ~/.vimrc.before;
done

The command above will disable every plugin provided by Janus except the core (which is pathogen and settings, which I'm sure won't be causing any segfaults) if MacVim did start without problems try removing plugins from ~/.vimrc.before one by one and starting MacVim afterwards so you could narrow down the problem, start with command-t, if you enable command-t and macvim starts then it is not the source of the problem and you should continue on to the next plugin.

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

It's hammer.

dudleyf commented Dec 3, 2011

It's hammer.

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Hammer ? Weird

Do you have both github-markup and redcarpet installed on the system-wide ruby? You can find that out using

rvm use system
gem search github-markup
gem search redcarpet

@adrianrego did you ever have segfaults because of Hammer ?

Member

kalbasit commented Dec 3, 2011

Hammer ? Weird

Do you have both github-markup and redcarpet installed on the system-wide ruby? You can find that out using

rvm use system
gem search github-markup
gem search redcarpet

@adrianrego did you ever have segfaults because of Hammer ?

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

It's a known issue in Hammer. Apparently rvm causes the macvim ruby to load the wrong gem versions:
https://github.com/robgleeson/hammer.vim/issues/22
Thanks for helping me track it down!

dudleyf commented Dec 3, 2011

It's a known issue in Hammer. Apparently rvm causes the macvim ruby to load the wrong gem versions:
https://github.com/robgleeson/hammer.vim/issues/22
Thanks for helping me track it down!

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Oh We've encountered this before, please follow the Rvm Wiki page, let me know if it fixes your issue

Member

kalbasit commented Dec 3, 2011

Oh We've encountered this before, please follow the Rvm Wiki page, let me know if it fixes your issue

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

The function on that page ends up calling /usr/bin/vim instead of mvim. This one from the hammer issue works for me:

mvim() {
  (unset GEM_PATH GEM_HOME; command mvim "$@")
}

dudleyf commented Dec 3, 2011

The function on that page ends up calling /usr/bin/vim instead of mvim. This one from the hammer issue works for me:

mvim() {
  (unset GEM_PATH GEM_HOME; command mvim "$@")
}
@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Oops sorry about that, the function had vim hardcoded, I did not notice it, thanks for finding that out, would you mind trying it just to make sure the function works? Thank you

Member

kalbasit commented Dec 3, 2011

Oops sorry about that, the function had vim hardcoded, I did not notice it, thanks for finding that out, would you mind trying it just to make sure the function works? Thank you

@dudleyf

This comment has been minimized.

Show comment
Hide comment
@dudleyf

dudleyf Dec 3, 2011

Yep. Works like a charm, now. Thanks.

dudleyf commented Dec 3, 2011

Yep. Works like a charm, now. Thanks.

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 3, 2011

Member

Thank you

Member

kalbasit commented Dec 3, 2011

Thank you

@kalbasit kalbasit closed this Dec 3, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment