clear RUBYOPT?

4 views
Skip to first unread message

rogerdpack

unread,
Jan 25, 2010, 3:05:46 PM1/25/10
to Redcar
I run into this quite a bit...


e:\dev\digitalarchive_trunk>redcar
Redcar 0.3.2dev (jruby )
Exception in thread "main" :1: no such file to load -- ubygemsf
(LoadError)
...internal jruby stack elided...
from (unknown).(unknown)(:1)


(which means "you need to clear your RUBYOPT setting")

Maybe it should be cleared before firing up jruby?
-r

Mat Schaffer

unread,
Jan 25, 2010, 3:07:41 PM1/25/10
to redcar...@googlegroups.com
This seems like it'd be outside the redcar scope since it'll probably
break any ruby process on the system. How did 'ubygemsf' end up in
your environment anyway?

-Mat

> --
> You received this message because you are subscribed to the Google
> Groups "Redcar" group.
> To post to this group, send email to redcar...@googlegroups.com.
> To unsubscribe from this group, send email to redcar-edito...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/redcar-editor?hl=en
> .
>

rogerdpack

unread,
Jan 25, 2010, 3:08:26 PM1/25/10
to Redcar
> This seems like it'd be outside the redcar scope since it'll probably  
> break any ruby process on the system. How did 'ubygemsf' end up in  
> your environment anyway?

I set RUBYOPT=-rubygemsf -sane # my favorite gems or what not

Aaron McLeod

unread,
Jan 25, 2010, 3:08:42 PM1/25/10
to redcar...@googlegroups.com
I dont have a solution, but ive had that happen when trying to use snippet shortcuts in e texteditor on windows as well. I didnt have any issues with the recent release of redcar at home on windows 7. I'll try here at work on xp, see how it goes.

I recommend doing a google search on that error "Exception in thread "main" :1: no such file to load -- ubygemsf" and see what comes up.

--
You received this message because you are subscribed to the Google Groups "Redcar" group.
To post to this group, send email to redcar...@googlegroups.com.
To unsubscribe from this group, send email to redcar-edito...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redcar-editor?hl=en.




--
Aaron McLeod
http://agmprojects.com

Daniel Lucraft

unread,
Jan 25, 2010, 3:13:17 PM1/25/10
to redcar...@googlegroups.com
That's interesting, I haven't come across that before. I'm not sure what the best thing to do here is.

On the one hand, it's not our job to 'sanitize' the environment by clearing this up, and it wouldn't be easy because RUBYOPT will be loaded *before* any Redcar code is loaded.

On the other hand, if we distribute as a one click installer, then it's probably counter intuitive for the environment to affect the application like this.

Any thoughts?

Dan
_______________________________
Daniel Lucraft

twitter.com/danlucraft
danlucraft.com/blog

rogerdpack

unread,
Jan 25, 2010, 3:15:23 PM1/25/10
to Redcar
> On the one hand, it's not our job to 'sanitize' the environment by clearing this up, and it wouldn't be easy because RUBYOPT will be loaded *before* any Redcar code is loaded.

Hmm. My first thought was that "since I'm running this through
ruby.exe, it can sanitize the ENV before calling into jruby" or what
not...

> On the other hand, if we distribute as a one click installer, then it's probably counter intuitive for the environment to affect the application like this.

one click should probably sanitize it...at least in my case :)

-r

Aaron McLeod

unread,
Jan 25, 2010, 3:15:38 PM1/25/10
to redcar...@googlegroups.com
A lot of times with programs, it will auto-load a readme the first time you install it. Perhaps something like that could be implemented where it states simple instructions on how to fix.

Mat Schaffer

unread,
Jan 25, 2010, 3:32:30 PM1/25/10
to redcar...@googlegroups.com
Oh I see. I haven't used rubygemsf before so I thought it was a typo
or something.

I think it's reasonable that if we switch to jruby as part of the
bootstrapping process we can dump RUBYOPT. If people want to run with
thr variable preserved they could call it with the jruby jar directly.

-Mat

Daniel Lucraft

unread,
Jan 25, 2010, 3:35:00 PM1/25/10
to redcar...@googlegroups.com
Well, it's doable. If you run Redcar now with MRI Ruby it will spawn a JRuby process to take over. If we make the parent set RUBYOPT="" then the subprocess will inherit that and not fuck up.

In future we don't want people to have to have MRI Ruby installed, so we will have to write a Java binary. Let's not forget that we need to clear this variable then.

D
_______________________________
Daniel Lucraft

twitter.com/danlucraft
danlucraft.com/blog

Daniel Lucraft

unread,
Jan 25, 2010, 3:36:40 PM1/25/10
to redcar...@googlegroups.com
On 25 Jan 2010, at 20:35, Daniel Lucraft wrote:

> Well, it's doable. If you run Redcar now with MRI Ruby it will spawn a JRuby process to take over. If we make the parent set RUBYOPT="" then the subprocess will inherit that and not fuck up.

Well, on OSX and linux it will. On Windows, who knows?

D

rogerdpack

unread,
Jan 25, 2010, 3:41:05 PM1/25/10
to Redcar
> Well, on OSX and linux it will. On Windows, who knows?

I'm pretty certain that setting
ENV['X'] = 'y'
in windows, then running
system("something else")

inherits the ENV of the current process. My hunch is that more
"exotic" process spawning like Kernel.spawn and popen also do the
same.
-r

Mat Schaffer

unread,
Jan 25, 2010, 3:44:49 PM1/25/10
to redcar...@googlegroups.com
I filed this as http://redcar.lighthouseapp.com/projects/25090-redcar/tickets/130 which should help us remember it at some point down the road.

-Mat
Reply all
Reply to author
Forward
0 new messages