Tar2rubyscript: getting the path of the original executable

Hi,

I try using tar2rubyscript and I need to get the path to the original
executable. oldlocation doesn't seem to help because it referes to the
original working directory. Any idea?

Patrick

···

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

Erik Veenstra wrote:

----------------------------------------------------------------

$ cat application/init.rb
p $0
p __FILE__

Thanks Erik, but obviously I wasn't clear. I need the path to the old
.rb file, the one that is distributed and contains the tar file, not the
one in the temporary directory.

With __FILE__ and $0 I get the new location, with oldlocation I only get
the last PWD and not the location of the tar/rb file.

Patrick

···

--
Posted via http://www.ruby-forum.com/\.

Sorry, I misunderstood your question...

Currently, it's not possible to determine the path to the RBA.

Mmm...

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

Erik Veenstra wrote:

Sorry, I misunderstood your question...

Currently, it's not possible to determine the path to the RBA.

Mmm...

Then I have two suggestions for tar2rubyscript:

1) create an environment variable that points to the RBA
2) make the filename 'init.rb' configurable

Thanks in advance,

Patrick

···

--
Posted via http://www.ruby-forum.com/\.