2012-01-05 14:44:31 +11:00
|
|
|
export GEM_OPEN_EDITOR="$editor"
|
|
|
|
export IRBRC="$HOME/.irbrc"
|
|
|
|
export RBXOPT="-Xrbc.db=/tmp/rbx -X19"
|
2012-08-17 07:42:32 +10:00
|
|
|
export JRUBY_OPTS="--1.9"
|
2013-03-23 14:10:49 +11:00
|
|
|
|
2019-07-22 16:21:32 +10:00
|
|
|
# if [ -f $SHELL_FILES/../../languages/ruby/rubyrc.rb ]; then
|
|
|
|
# echo setting RUBYOPT
|
|
|
|
# export RUBYOPT="-r$SHELL_FILES/../../languages/ruby/rubyrc"
|
|
|
|
# fi
|
2013-04-02 05:00:14 +11:00
|
|
|
|
2013-04-01 08:03:43 +11:00
|
|
|
if [ -f "/usr/local/share/chruby/chruby.sh" ]; then
|
|
|
|
source /usr/local/share/chruby/chruby.sh
|
|
|
|
source /usr/local/share/chruby/auto.sh
|
|
|
|
|
|
|
|
function current_ruby() {
|
|
|
|
if [ "x$RUBY_ROOT" != "x" ]; then
|
2013-04-02 05:00:33 +11:00
|
|
|
basename $RUBY_ROOT
|
2013-04-01 08:03:43 +11:00
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
2019-07-22 16:21:32 +10:00
|
|
|
elif command -v rbenv; then
|
2013-04-01 08:03:43 +11:00
|
|
|
eval "$(rbenv init - $CURRENT_SHELL)"
|
|
|
|
|
|
|
|
function current_ruby() {
|
2013-04-02 05:00:33 +11:00
|
|
|
rbenv version-name
|
2013-04-01 08:03:43 +11:00
|
|
|
}
|
2019-07-22 16:21:32 +10:00
|
|
|
elif command -v rvm; then
|
2013-04-01 08:03:43 +11:00
|
|
|
source $HOME/.rvm/scripts/rvm
|
|
|
|
|
|
|
|
function current_ruby() {
|
2013-04-02 05:00:33 +11:00
|
|
|
rvm-prompt
|
2013-04-01 08:03:43 +11:00
|
|
|
}
|
2013-04-02 04:48:11 +11:00
|
|
|
else
|
2013-04-03 08:29:28 +11:00
|
|
|
function current_ruby() {
|
|
|
|
exit 0
|
|
|
|
}
|
2013-04-01 08:03:43 +11:00
|
|
|
fi
|