Rubywebdialog

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..

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

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!".

···

--
Hayato Mikami
Mail : fermikami AT gmail DOT com
Site : http://fermikami.homeunix.org/~mikami/

I rushed througn the instruction etc in
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)

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/

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

The simplest solution could be installation of ruby 1.8.2,
though I haven't tried yet.
# see also "7. Known Issues" in RubyWebDialogs.

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

$SAFE = 0

but still got
C:\Documents and Settings\ri004902>ruby
C:\rubyexample\rubywebdialogs\rwdhelloworld.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
)

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 .

···

--
Hayato Mikami
Mail : fermikami AT gmail DOT com
Site : http://fermikami.homeunix.org/~mikami/

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/"
The browser has terminated.
************************************************************************************************
If you can throw some light .. will be great..

thanks Hayato and Erik.

I will take it further.

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/"
The browser has terminated.
************************************************************************************************

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/