# Rubywebdialog

**URL:** <https://www.ruby-forum.com/t/rubywebdialog/98404>\
**Category:** Ruby\
**Created:** [July 14, 2006, 2:38pm UTC](https://www.ruby-forum.com/t/rubywebdialog/98404 "2006-07-14T14:38:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajib](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rajib](https://www.ruby-forum.com/u/rajib)\
**Post date:** [July 14, 2006, 2:38pm UTC](https://www.ruby-forum.com/t/rubywebdialog/98404/1 "2006-07-14T14:38:48Z")

</div>

This is rajib a ruby nub…e .

I was looking for some serious gui programming on GUI in ruby when i  
came upon the Rubywebdialog … a wonderful approach for universal GUI.

I rushed througn the instruction etc in  
[http://www.erikveen.dds.nl/rubywebdialogs/index.html](http://www.erikveen.dds.nl/rubywebdialogs/index.html)…

# And tried to run rwdhelloworld.rbw. But some strange error is appearing … can any one point me to my mistakes

# C:\rubyexample\rubywebdialogs\>ruby rwdhelloworld.rbw Looking for default browser… Starting the browser… C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2692.1/tmp.ear2rubyscript.f. 11594.tar/ev/rwd.rb:1175:in `system': Insecure operation - system (SecurityError ) from C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2692.1/tmp.ear2 rubyscript.f.11594.tar/ev/rwd.rb:1175:in `initialize’ from C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2692.1/tmp.ear2 rubyscript.f.11594.tar/ev/rwd.rb:1160:in `initialize' from C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2692.1/tmp.ear2 rubyscript.f.11594.tar/ev/rwd.rb:802:in `serve’ from C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2692.1/tmp.ear2 rubyscript.f.11594.tar/init.rb:3 from rwdhelloworld.rbw:538 from rwdhelloworld.rbw:503:in `newlocation' from rwdhelloworld.rbw:439:in `newlocation’ from rwdhelloworld.rbw:420:in `newlocation' from rwdhelloworld.rbw:439:in `newlocation’ from rwdhelloworld.rbw:503:in `newlocation’ from rwdhelloworld.rbw:533

Thanks

---

<div class="post-metadata">

**Author:** ![rajib](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rajib](https://www.ruby-forum.com/u/rajib)\
**Post date:** [July 14, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/rubywebdialog/98404/2 "2006-07-14T15:26:08Z")

</div>

> C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2692.1/tmp.ear2rubyscript.f.  
> 11594.tar/ev/rwd.rb:1175:in `system’: Insecure operation - system  
> (SecurityError  
> )

Because “$SAFE = 2” in ev/rwd.rb:59.

I wrote “$SAFE = 0” and could watch “Hello Warld!”.

---

<div class="post-metadata">

**Author:** ![rajib](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rajib](https://www.ruby-forum.com/u/rajib)\
**Post date:** [July 14, 2006, 5:00pm UTC](https://www.ruby-forum.com/t/rubywebdialog/98404/3 "2006-07-14T17:00:02Z")

</div>

> 11594.tar/ev/rwd.rb:1175:in `system’: Insecure operation - system  
> (SecurityError)

If you set the environmental variable RWDBROWSER to nothing  
(that’s _not_ the same as unset…), you should be able to  
start the application, after which you should start the browser  
by hand and navigate to the given address.

I definitely need to update RubyWebDialogs… If I only had  
time… (I’m currently working on a new version of  
RubyScript2Exe. The one with support for directories.)

gegroet,  
Erik V. - [http://www.erikveen.dds.nl/](http://www.erikveen.dds.nl/)

---

<div class="post-metadata">

**Author:** ![rajib](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rajib](https://www.ruby-forum.com/u/rajib)\
**Post date:** [July 15, 2006, 5:41pm UTC](https://www.ruby-forum.com/t/rubywebdialog/98404/4 "2006-07-15T17:41:48Z")

</div>

The simplest solution could be installation of ruby 1.8.2,  
though I haven’t tried yet.

# see also “7. Known Issues” in RubyWebDialogs.

> # 11594.tar/ev/rwd.rb:1175:in `system’: Insecure operation - system (SecurityError )
> 
> Did you do something else too…

Nothing, but I didn’t try rubyhelloworld.rbw.  
I tried rwdpanels.tar.gz with ruby 1.8.5 (stable-snapshot) on Fedora  
Core 5.

(1). download rwdhelloworld.tar.gz  
(2). expand rwdhelloworld.tar.gz  
(3). change ev/rwd.rb in tmp.ear2rubyscript.f.11594.tar , the  
directory created at 2

line 59: $SAFE=0

(4). run init.rb in tmp.ear2rubyscript.f.11594.tar

That’s all.

I found another solution to delete the 1175th line in ev/rwd.rb while  
trying rwdhelloworld.tar.gz  
Without that line, RWDServer fail to start the browser, and init.rb  
tell the URL of “hello world”.  
if you go to the URL, you can watch “hello world”.

# note that I tried not .rbw but .tar.gz .

---

<div class="post-metadata">

**Author:** ![rajib](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rajib](https://www.ruby-forum.com/u/rajib)\
**Post date:** [July 15, 2006, 9:26am UTC](https://www.ruby-forum.com/t/rubywebdialog/98404/5 "2006-07-15T09:26:22Z")

</div>

Hayato Mikami wrote:

> Because “$SAFE = 2” in ev/rwd.rb:59.
> 
> I wrote “$SAFE = 0” and could watch “Hello Warld!”.

========  
Tahnks for your reply…Hayato

I cahnged as suggested to ev/rwd.rb line 59

$SAFE = 0

but still got  
C:\Documents and Settings\ri004902\>ruby  
C:\rubyexample\rubywebdialogs\rwdhellowo  
rld.rbw  
Starting the browser…  
C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2656.1/tmp.ear2rubyscript.f.  
11594.tar/ev/rwd.rb:1175:in `system': Insecure operation - system (SecurityError ) from C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2656.1/tmp.ear2 rubyscript.f.11594.tar/ev/rwd.rb:1175:in`initialize’  
from  
C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2656.1/tmp.ear2  
rubyscript.f.11594.tar/ev/rwd.rb:1160:in `initialize' from C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2656.1/tmp.ear2 rubyscript.f.11594.tar/ev/rwd.rb:802:in`serve’  
from  
C:/DOCUME~1/ri004902/LOCALS~1/Temp/tar2rubyscript.d.2656.1/tmp.ear2  
rubyscript.f.11594.tar/init.rb:3  
from C:/rubyexample/rubywebdialogs/rwdhelloworld.rbw:538  
from C:/rubyexample/rubywebdialogs/rwdhelloworld.rbw:503:in  
`newlocation ' from C:/rubyexample/rubywebdialogs/rwdhelloworld.rbw:439:in`newlocation  
’  
from C:/rubyexample/rubywebdialogs/rwdhelloworld.rbw:420:in  
`newlocation ' from C:/rubyexample/rubywebdialogs/rwdhelloworld.rbw:439:in`newlocation  
’  
from C:/rubyexample/rubywebdialogs/rwdhelloworld.rbw:503:in  
`newlocation  
’  
from C:/rubyexample/rubywebdialogs/rwdhelloworld.rbw:533

=============================  
Did you do something else too…

=============================

Erik … really appreciate your efforts…

I changed the RWDBROWSER envioronment variable to " Nothing" as seen  
below

C:\Documents and Settings\ri004902\>set R  
RUBYOPT=-rubygems  
RWDBROWSER=Nothing

…  
But the damn Insecure operation remains and I am unable to run the  
application…

Pl suggest

Thanks

---

<div class="post-metadata">

**Author:** ![rajib](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rajib](https://www.ruby-forum.com/u/rajib)\
**Post date:** [July 18, 2006, 1:17pm UTC](https://www.ruby-forum.com/t/rubywebdialog/98404/6 "2006-07-18T13:17:20Z")

</div>

Oh … it is working now…

The steps i followed in my WINDOWS2000… [ruby 1.8.4 (2005-12-24)  
[i386-mswin32]]…FIREFOX browser

1\> I extracted the “rubywebdialogs.tar.gz” to  
“C:\ruby\lib\ruby\site\_ruby\1.8\ev”  
2\> set the RWDBROWSER env variable in windows to  
RWDBROWSER=“C:\Program Files\Mozilla Firefox\firefox.exe”

3\> Changed line 59 of C:\ruby\lib\ruby\site\_ruby\1.8\ev\rwd.rb to  
$SAFE = 0

4\> ran C:\ruby\lib\ruby\site\_ruby\1.8\ev\init.rb from Activestate  
Komodo …

5\> Firefox browser fires up and shows Hello World perfectly.

# Only couple of notes to Erik … if you are listening

Although the browser is up and showing… in my Debug window… i  
get

* * *

Starting of the browser failed, or the browser terminated abnormally.  
Command =\> “C:\Program Files\Mozilla Firefox\firefox.exe”  
“[http://localhost:7702/](http://localhost:7702/)”  
The browser has terminated.

* * *

If you can throw some light … will be great…

thanks Hayato and Erik.

I will take it further.

---

<div class="post-metadata">

**Author:** ![rajib](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f14d63/32.png) [@rajib](https://www.ruby-forum.com/u/rajib)\
**Post date:** [July 19, 2006, 12:53am UTC](https://www.ruby-forum.com/t/rubywebdialog/98404/7 "2006-07-19T00:53:23Z")

</div>

> If you can throw some light … will be great…  
> That’s because FireFox was already running. Instead of starting  
> a new FireFox, the old FireFox “catches” the new one, which  
> causes the new one to stop immediately.

gegroet,  
Erik V. - [http://www.erikveen.dds.nl/](http://www.erikveen.dds.nl/)
