开发者

How to set RUBYOPT for only specific RVM versions?

开发者 https://www.devze.com 2023-03-07 23:50 出处:网络
I would like to have RUBYOPT=-r openssl set for only my gemsets that a开发者_运维知识库re using Ruby 1.9.x.

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

精彩评论

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