Forum: Ruby tar2rubyscript/rubyscript2exe

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9dafa9178611d98f82be35e80b017be9?d=identicon&s=25 Kilivor Kante (kilivor)
on 2006-02-05 10:34
Hi!

I have been using tar2rubyscript and rubyscript2exe with FXRuby and it
works like a charm. But now first time I am trying to generate a file
from ruby. It works fine with the interpreter, but apparently not with
the generated exe.

Here the three lines of code (in a file named init.rb)

  file = File.open("test.txt", "w")
  file << "Hello world from the file"
  file.close()

And what I do:

  ruby tar2rubyscript-0.4.7.rb eclipse/test/
  ruby rubyscript2exe.rb eclipse/test.rb

What I am missing here? I don't know what happens. No error, no message
and no output file. Do I need extra configuration? I am using Windows XP
(in the office) and XP 64-bit (at home). Same results. Ruby 182-15 and
last versions of both tools.

Thanks for your help.
E1419a0f15d29ac884cb276fa8bf87dd?d=identicon&s=25 Erik Veenstra (erikveen)
on 2006-02-13 10:57
>   file = File.open("test.txt", "w")

Should be:

 file = File.open(oldlocation("test.txt"), "w")

It's described on the site [1].

gegroet,
Erik V. - http://www.erikveen.dds.nl/

 [1] http://www.erikveen.dds.nl/tar2rubyscript/index.ht...
This topic is locked and can not be replied to.