Maaaaaaaaaaaaajor sanity check needed.
I wrote a simple little plugin, and it wouldn’t load. I put some
in it’s init.rb, and it didn’t even spit those out. So, I dug into the
initializer.rb (/vendor/rails/railties/lib/initializer.rb) to see wtf is
going on, and found the problem… but… can’t explain it. Here is the
code in question:
lib_path = File.join(directory, 'lib') init_path = File.join(directory, 'init.rb') has_lib = File.directory?(lib_path) #raise LoadError, "Dude, this path is ok: " + has_lib# =>
has_init = File.file?(init_path)
#raise LoadError, “WTF !..” + has_init.to_s# =>
I’ve loaded the same situation up in IRB, and it works fine. Why is
File.file?(init_path) returning false !?
Permissions are fine, the path is fine:
I’m losing my mind.