[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RUBYOPT: Where is it (env) defined?

Frederick Lee

5/1/2009 7:50:00 PM

I need to remove the RUBYOPT variable from the environment so I can
install MacRuby.

I've checked all my (local) environment (dot) files. I can't find any
RUBYOPT env variable definition. In fact, it is global, since I can see
it in another user session within my MacBook Pro.

I've checked the /etc/profile but RUBYOPT isn't defined there.

Question: Where would the global env RUBYOPT definition/assignment be?

...and is there an effective way to track down the source of global env
variables definitions/assignments?

Regards,

Ric.
--
Posted via http://www.ruby-....

5 Answers

Marc Heiler

5/2/2009 9:02:00 PM

0

> Question: Where would the global env RUBYOPT definition/assignment be?

Isn't it defined by the shell you use?

echo $RUBYOPT

If you can't find it, on Linux systems, I always use grep -r
--
Posted via http://www.ruby-....

Jeff Schwab

5/2/2009 9:20:00 PM

0

Frederick Lee wrote:
> I need to remove the RUBYOPT variable from the environment so I can
> install MacRuby.

unset RUBYOPT

Frederick Lee

5/3/2009 6:59:00 PM

0


Yes, I can see it.

[/Users/Ric]echo $RUBYOPT
rubygems

I tried using grep to find RUBYOPT within my local startup files:

[/Users/Ric]grep "RUBYOPT" .*
profile:export RUBYOPT=rubygems
viminfo:~MSle0~/RUBYOPT
viminfo:?/RUBYOPT

I missed the .profile file; so I commented out 'RUBYOPT':
#
# Your previous .profile (if any) is saved as .profile.mpsaved
# Setting the path for MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# export RUBYOPT=rubygems

Still...

[/Users/Ric]echo $RUBYOPT
rubygems

.... So it turns out that RUBYOPT was defined everywhere.
But via 'grep', it appears I plugged-up its definition within
the local scheme.

... Where else can I find (global) startup files to check?







Marc Heiler wrote:
>> Question: Where would the global env RUBYOPT definition/assignment be?
>
> Isn't it defined by the shell you use?
>
> echo $RUBYOPT
>
> If you can't find it, on Linux systems, I always use grep -r

--
Posted via http://www.ruby-....

matt

5/3/2009 8:13:00 PM

0

Frederick Lee <amourinetech@gmail.com> wrote:

> I tried using grep to find RUBYOPT within my local startup files:
>
> [/Users/Ric]grep "RUBYOPT" .*
> profile:export RUBYOPT=rubygems
> viminfo:~MSle0~/RUBYOPT
> viminfo:?/RUBYOPT
>
> I missed the .profile file; so I commented out 'RUBYOPT':
> #
> # Your previous .profile (if any) is saved as .profile.mpsaved
> # Setting the path for MacPorts.
> export PATH=/opt/local/bin:/opt/local/sbin:$PATH
> # export RUBYOPT=rubygems
>
> Still...
>
> [/Users/Ric]echo $RUBYOPT
> rubygems
>
> ... So it turns out that RUBYOPT was defined everywhere.
> But via 'grep', it appears I plugged-up its definition within
> the local scheme.
>
> .. Where else can I find (global) startup files to check?

Why not try doing what Marc said? Use grep -r. And start at "/", the top
level. It will take a long time but at least you'll find it. For maximum
scope you might need to run as the superuser. Anyway way this has long
ago ceased to have anything to do with Ruby. m.

> Marc Heiler wrote:
> >> Question: Where would the global env RUBYOPT definition/assignment be?
> >
> > Isn't it defined by the shell you use?
> >
> > echo $RUBYOPT
> >
> > If you can't find it, on Linux systems, I always use grep -r


--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...

Frederick Lee

5/4/2009 8:23:00 PM

0


I've been running 'grep -r /' for several hours.

I decided to try:
'unsetenv RUBYOPT' in my .login file.

Apparently it works!
I don't see the RUBYOPT env listed.

Albeit I still can't find the source of RUBYOPT, I managed
to REMOVE it via the follow-up local .login run.

BTW: I'm using tcsh vs bash.

Ric.



matt neuburg wrote:
> Frederick Lee <amourinetech@gmail.com> wrote:
>
>> # Setting the path for MacPorts.
>> the local scheme.
>>
>> .. Where else can I find (global) startup files to check?
>
> Why not try doing what Marc said? Use grep -r. And start at "/", the top
> level. It will take a long time but at least you'll find it. For maximum
> scope you might need to run as the superuser. Anyway way this has long
> ago ceased to have anything to do with Ruby. m.

--
Posted via http://www.ruby-....