From: Diogo Veras Date: 2010-09-17T13:09:26+09:00 Subject: Re: undefined local variable or method '_FILE_' Jeremy Bopp wrote: > On 09/16/2010 10:59 PM, Diogo Veras wrote: >> I've got this error in Windows Seven and Ubuntu 10.04 LTS, both using >> Ruby 1.8.7 >> >> Have also tried running the code in .rb file but get the same error. >> Neither File.dirname(_FILE_) nor only _FILE_ seems to work. >> >> Looked about it everywhere but got nothing. Any idea..? > > You need to use __FILE__ (note the 2 underscores on each side). > > -Jeremy It worked. Can't believe, you are right, have no idea how I let this pass. Thank you a lot. Regards -- Posted via http://www.ruby-forum.com/.