开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜