Default Ruby is lost after .ruby-version #184

Open
jordelver opened this Issue Jul 22, 2013 · 3 comments

Comments

Projects
None yet
2 participants

I set a default Ruby in my ~/.zshrc

source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh

chruby 2.0.0

The default Ruby is used as expected. When I change into a directory containing a .ruby-version file, the Ruby is changed to the version contained within, as expected.

When I change out of the directory, the system Ruby is now the default again.

Is there anyway to restore the original default without having to invoke chruby 2.0.0 again?

Owner

postmodern commented Jul 22, 2013

Yep, currently chruby has no way of retaining the default version. Will work on this in 0.4.0.

Owner

postmodern commented Jul 22, 2013

See #170. Probably the least disruptive approach would be to use ~/.ruby-version as the default version to fall back to.

Thanks, adding a ~/.ruby-version is a good workaround 👍

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