On 01/15/2012 05:24 PM, Hilco Wijbenga wrote:
Hi all,

The dev-ruby/rubygems ebuild adds "-rauto_gem" to the global RUBYOPT.
This breaks my own scripts so I have removed it from /etc/env.d. So
far, so good.

I just tried upgrading dev-ruby/json and it failed because I did not
have RUBYOPT set. Obviously, the "fix" was easy but now I'm wondering
... is this really the best approach?

It does not seem like a good idea that the rubygems ebuild sets
RUBYOPT and subsequent (Ruby Gems related) emerges break without it.
Would it not be simpler and more reliable if ebuilds that need it
simply execute "export RUBYOPT=..." prior to running? Why does it have
to be in the global environment, forcing it on every user?

If there is a requirement for this to be in the global environment,
what is the consequence of unsetting RUBYOPT in my own .bashrc (or
similar)? Is that "safe"? Or does that break something that I simply
haven't noticed yet?


(1) I don't know much about ruby packaging

(2) Keeping (1) in mind, I agree with you

(3) You're asking the wrong people

Try asking on the -dev list, or filing a bug. They'll just close it if it's considered invalid.

This bit me once long ago: ruby scripts running from cron don't have their RUBYOPT set, so scripts that normally work "magically" fail. Since I never set RUBYOPT myself, I didn't expect it to be set. Of course, I just forgot to require rubygems in my script.

Reply via email to