I am trying to have files under myapplication/somefolder
. Google and Stackoverflow say I should add this:
config.autoload_paths += %W(#{config.root}/somefolder)
in my config/application.rb
, so I did.
But the files don't get loaded.
I tried namig somefolder/myclass.rb
both class Myclass
and class Somefolder::Myclass
but still no luck.
I can see that the dir was found in Rails.application.config.autoload_paths
in console does indeed include my /path/to/myapplication/somefolder
directory, so that should be okay.
All the other questions around this topic use theapp/app/somefolder
or theapp/lib/somefolder
but not theapp/somefolder
so maybe thats where it gets rotten.
So I tried referencing the class with ::Somefolder::MyClass
but not even that helped.
I am using Rails 3.2.1