From 90eae2b491495d8dde9d4ec5a7125a897733781d Mon Sep 17 00:00:00 2001 From: Shane O'Grady Date: Wed, 4 Jun 2014 11:41:11 -0300 Subject: [PATCH] If a default Ruby is set, switch to it Set PATH variables to allow gems such as Bundler to be found and for the `ruby-info` function to properly work. A default Ruby must be set in ~/.ruby-version; for more information, see https://github.com/postmodern/chruby#default-ruby. Signed-off-by: Sorin Ionescu --- modules/ruby/init.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ruby/init.zsh b/modules/ruby/init.zsh index 174d185..fd707d0 100644 --- a/modules/ruby/init.zsh +++ b/modules/ruby/init.zsh @@ -28,6 +28,9 @@ elif (( $+commands[chruby-exec] )); then source "${commands[chruby-exec]:h:h}/share/chruby/chruby.sh" if zstyle -t ':prezto:module:ruby:chruby' auto-switch; then source "${commands[chruby-exec]:h:h}/share/chruby/auto.sh" + + # If a default Ruby is set, switch to it. + chruby_auto fi # Prepend local gems bin directories to PATH.