Skip to content

Conversation

@brainopia
Copy link

After a visit to directory with .ruby-version, chruby picks up correct
ruby version.

But afterwards (when you leave from aforementioned directory to a
directory without .ruby-version) chruby defaults to system ruby (which
is no ruby at all in my case).

It bothered me and my friends so I've created a test implementation of
chruby_default.

My bashrc contains:

. /usr/local/share/chruby/chruby.sh
. /usr/local/share/chruby/auto.sh
chruby_default 2.1

And it works for me fine.

After a visit to directory with .ruby-version, chruby picks up correct
ruby version.

But afterwards (when you leave from aforementioned directory to a
directory without .ruby-version) chruby defaults to system ruby (which
is no ruby at all in my case).

It bothered me and my friends so I've created a test implementation of
chruby_default.

My bashrc contains:

. /usr/local/share/chruby/chruby.sh
. /usr/local/share/chruby/auto.sh
chruby_default 2.1

And it works for me fine.
@brainopia
Copy link
Author

Heh, I guess "~/.ruby-version" is a better solution.

@brainopia brainopia closed this Jan 15, 2014
@brndnblck
Copy link

I actually just threw chruby 2.0.0 in ~/.zshrc so that I'd get my "default" even when I'm not in my user home.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants