-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
while coming from chruby
with frustration i tried fry
with fun but had to revert back to my direnv
script due to the lack of support for the above. or am i missing something?
part of my .direvnrc
:
rb_version="2.3.1"
use_ruby() {
local ruby_ver=$1
local ruby_dir=$HOME/.rubies/ruby-$ruby_ver
local gem_dir=$HOME/.gem/ruby/$ruby_ver
export GEM_HOME="$gem_dir"
export GEM_PATH="$gem_dir"
export BUNDLE_BIN="$ruby_dir/bin"
path_add MANPATH "$ruby_dir/share/man"
PATH_add "$HOME/.rubies/ruby-$ruby_ver/bin"
PATH_add "$GEM_HOME/bin"
PATH_add "$BUNDLE_BIN"
}
if [ -f ".ruby-version" ]; then
use ruby "$(cat .ruby-version)"
else
use ruby $rb_version
fi
if [ -n "$GEM_HOME" ]; then
echo "ruby gems at: $GEM_HOME"
fi
while it works well and is kinda POSIX
portable i'd still prefer something fishy because i use that shell heavily.
another thought is that bloating up fry
might not be good so i'll consider https://github.com/jamesob/desk as it kinda closely resembles direnv
.
Metadata
Metadata
Assignees
Labels
No labels