The post @daniel refers to is from 2008. Rails has changed since then.
In fact, quite recently. Rails3 doesn't load the lib/ directory automatically.
You can reactivate it quite easily though. Open config/application.rb
And add, in the config (in the Application
class) the followin :
config.autoload_paths += %W(#{config.root}/lib)
Then your lib/ dir will be autoloaded.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…