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
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
$ cat application/init.rb
p $0
p FILE
$ ruby tar2rubyscript.rb application/
Creating archive…
Creating application.rb …
$ ruby application.rb
“…/Temp/tar2rubyscript.d.2900.1/application/init.rb”
“…/Temp/tar2rubyscript.d.2900.1/application/init.rb”
Erik V. 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
Erik V. 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:
Thanks in advance,
Patrick
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/
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs