Windows: uru can't locate .ruby-version
Issue #62
resolved
Uru only locates .ruby-version
when called from its install location.
.ruby-version
is in the uru install directory:
- C:\Open\path
- .ruby-version
- uru.bat
- uru.ps1
- uru_rt.exe
Calls from any other directory raise an error:
PS C:\Users\Luis\git\wintersmith\ctsi> uru auto
---> unable to find or process a `.ruby-version` file
Comments (2)
-
repo owner -
repo owner - changed status to resolved
Closed.
Started a ruby-version wiki page to clarify typical usage.
- Log in to comment
This behavior is not a bug. You misunderstand how
.ruby-version
files anduru auto
work.uru auto
walks up from your current dir to the root directory looking for a.ruby-version
file. If it finds the file, it tries to activate a ruby matching the version info in the file. If the dir walk ends at root (C:\
in your example) without finding a.ruby-version
file, it does a final check in%USERPROFILE%
(C:\Users\Luis
in your example) before giving up.It doesn't walk up the dir tree, then check arbitrary dirs such as your
C:\Open\path
location. If you are familiar with go and interested, theuru auto
code lives hereIn the following example the
.ruby-version
files lives two levels above the current dirIn your example, you can place a
.ruby-version
at any level in yourC:\Users\Luis\git\wintersmith\ctsi
tree anduru auto
should find and use it.