Closed plutino closed 9 years ago
I can confirm a similar scenario:
$ ruby -v
> ruby 2.1.3 # (set as system default through bashrc file with chruby)
$ cd dir_with_ruby_version_file
$ ruby -v
> ruby 2.1.1
$ cd ..
$ ruby -v
> ruby 2.0.0 # (system ruby)
I have no clue what could be causing this but this pretty much defeats the purpose of chruby. Yosemite 10.10
Noticed my scenario is a duplicate of #184 Provisional workaround: https://github.com/postmodern/chruby/issues/184#issuecomment-21380629]
Yep, this is unfortunately well known behavior.
Not sure if this is to be expected, but this is the scenario that causes us trouble:
start at a directory containing a .ruby-version file; explicitly change Ruby version by
chruby 2.1.2
; cd to working directorycd /path/to/work
; Ruby version is no longer set.An easy work around is to cd before chruby, although it's awkardly inconvenient for us. I'm wondering if it's better to keep previous version if no .ruby-version file is found in the tree.