when I use fisher install plugins, then show:
fish: An error occurred while redirecting file '/Users/koofrank/.rbenv/version'
open: No such file or directory
and I use fisher any command line doesn't work, so I how to uninstall fisher and fix this problem, I use fisher uninstall not work
@phpmaple Thanks, I don't use rbenv so I have never had this problem before, but @daenney, can you share some of your rbenv wisdom with us here?
@phpmaple How do you do the rbenv stuff? With the normal rbenv integration or using the fisherman rbenv plugin?
@daenney When I use fisher install some plugins, Then show this error, and then fisher doesn't work
@phpmaple I think the folder is created when rbenv the utility, not the fisherman plugin, is installed, so if you don't have it installed, then an error will be thrown. In any case, the issue is not fisherman-specific.
@jethrokuan I uninstall rbenv, then everything is ok
@phpmaple do you confirm that you have https://github.com/rbenv/rbenv installed?
@jethrokuan I sure
It looks like the bobthefish theme is expecting to find the global ruby version in ~/.rbenv/version but it's not there. I had this same problem too (coming from having regular rbenv+fish to fish+fisherman with the rbenv plugin). The relevant lines of fish_prompt.fish are:
# Don't show global ruby version...
set -q RBENV_ROOT
or set -l RBENV_ROOT $HOME/.rbenv
read -l global_ruby_version <$RBENV_ROOT/version
However, I did not have the version file in my ~/.rbenv folder
For me, the following resolved the issue, though I'm not sure if it's a proper solution:
rbenv version-name > ~/.rbenv/version
Everyone still having problems:
Replace
# Don't show global ruby version...
set -q RBENV_ROOT
or set -l RBENV_ROOT $HOME/.rbenv
read -l global_ruby_version <$RBENV_ROOT/version
with
set global_ruby_version (rbenv global)
Per https://github.com/rnorth/bobthefish/commit/ba3b165371ff90ef916ac008a25f60f62f56c84a
And make sure you have a version of Ruby installed via rbenv.
The above bgbthefish fix is a package specific fix but to fix your whole RBENV system see the following:
So it looks like after you install RBENV there is no ~/.rbenv/version file. To create it just run rbenv global system . Then that file will be created and everything will work.
To change the version from system just run something like rbenv global 2.4.1 (of course after you've installed version 2.4.1 using rbenv install 2.4.1).
Most helpful comment
It looks like the bobthefish theme is expecting to find the global ruby version in
~/.rbenv/versionbut it's not there. I had this same problem too (coming from having regular rbenv+fish to fish+fisherman with the rbenv plugin). The relevant lines offish_prompt.fishare:However, I did not have the
versionfile in my~/.rbenvfolderFor me, the following resolved the issue, though I'm not sure if it's a proper solution: