Luis Lavena
1/31/2009 8:43:00 PM
On Jan 31, 5:41 pm, Jarmo Pertman <jarm...@gmail.com> wrote:
> Strange, it worked for me correctly under Windows XP when starting
> script right with .rb file itself, like
> D:\Projects\Ruby>blah.rb
> D:/Projects/Ruby
>
> But, when starting with ruby.exe:
> D:\Projects\Ruby>ruby blah.rb
That's because you didn't provide the path to blah.rb
Luis@KEORE (D:\Users\Luis\Desktop)
$ type blah.rb
puts File.dirname(__FILE__)
Luis@KEORE (D:\Users\Luis\Desktop)
$ ruby blah.rb
.
Luis@KEORE (D:\Users\Luis\Desktop)
$ ruby d:\Users\Luis\Desktop\blah.rb
d:/Users/Luis/Desktop
--
Luis Lavena