Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
How to find directory of currently running .rb file
Kenneth McDonald
10/27/2008 7:01:00 PM
__FILE__ is just giving me the file name, with no path, and Dir.getwd
is giving me an error: "ENOENT: No such file or directory." What is
the proper way to get this info?
Thanks in advance,
Ken McDonald
1 Answer
Brian Candler
10/27/2008 9:18:00 PM
0
Kenneth McDonald wrote:
> __FILE__ is just giving me the file name, with no path, and Dir.getwd
> is giving me an error: "ENOENT: No such file or directory." What is
> the proper way to get this info?
File.dirname(__FILE__)
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
How to find directory of currently running .rb file
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password