Undefined local variable or method `__File__' for main:Object (NameError)

Hi! I am new to Ruby and would appreciate some help!

I have:
APP_ROOT = File.dirname(File)

$:.unshift ( File.join(APP_ROOT, ‘lib’))
require ‘guide’

When I try to run it, I get the following error:
undefined local variable or method `File’ for main:Object
(NameError)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs