How to install RUBYOPT only for certain versions of RVM?

I would like to install RUBYOPT=-r opensslonly for my gemsems that use Ruby 1.9.x. Ruby 1.8.x complains about an "illegal switch in RUBYOPT ..." if I have this kit worldwide.

Thank.

+3
source share
1 answer

In ~/.rvm/hooks/after_use, put:

if echo $rvm_ruby_version | grep -q '1.9'; then
  export RUBYOPT='-r openssl'
else
  export RUBYOPT=
fi
+5
source

All Articles