Don’t know why but when I try to use the FILE variable I’m getting the
irb(main):001:0> puts File.dirname(FILE)
NameError: undefined local variable or method `FILE’ for main:Object
I’ve got this error in Windows Seven and Ubuntu 10.04 LTS, both using
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…?