How to set RUBYOPT for only specific RVM versions?
I would like to have RUBYOPT=-r openssl
set for only my gemsets that a开发者_运维知识库re using Ruby 1.9.x.
Ruby 1.8.x complains "illegal switch in RUBYOPT..." if I have this set globally.
Thank you.
In ~/.rvm/hooks/after_use
, put:
if echo $rvm_ruby_version | grep -q '1.9'; then
export RUBYOPT='-r openssl'
else
export RUBYOPT=
fi
精彩评论