-
I'm trying to have my local ruby used/detected by graphical neovim MacOS applications (goneovim or VimR). I'm trying things like:
But this doesn't work. Any help appreciated. My In particular, this documentation could be updated to describe how one can use chruby to set |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to make this work in command line
and #!/bin/zsh
if [ -d /usr/local/share/chruby ]; then
# amd64
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
elif [ -d /opt/homebrew/share/chruby ]; then
# arm64
source /opt/homebrew/share/chruby/chruby.sh
source /opt/homebrew/share/chruby/auto.sh
fi
chruby_auto
# original call
exec "ruby" "$@" In order to make this work in goneovim/VimR one more trick is required. Those MacOS applications will not read # RUBY version switching
# chruby / rvm (load either one conditionally)
if [ -d /usr/local/share/chruby ]; then
# chruby (amd64)
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
elif [ -d /opt/homebrew/share/chruby ]; then
# chruby (arm64)
source /opt/homebrew/share/chruby/chruby.sh
source /opt/homebrew/share/chruby/auto.sh
fi
# Automatically switch to the ruby version specified in the .ruby-version file
# present in the current directory
chruby_auto It is also necessary to run goneovim/VimR from the command line while being in your project's directory: cd ~/my-project
goneovim |
Beta Was this translation helpful? Give feedback.
I was able to make this work in command line
nvim
with the following configuration:and
chruby-wrapper
looking like this:In order to make this work in goneovim/VimR one more trick is required. Those MacOS applications will not read
~/.zshrc
while running as this file is only read for interactive shells (ref…