Rails 3: problems with ‘lib’ and ‘require’

Hi!

Ruby files from the lib directory don’t automaticaly loaded/required.
I tried adding string:

config.autoload_paths += %W(#{config.root}/lib)

to my application.rb file but it doesn’t work too.

Second problem with ‘require’ files (libs or modules). At the first
request to the application necessary files includes. But at the
following requests it doesn’t occur. Partially this problem can be
decided if to use ‘include’ instead ‘require’ but it’s bad solution :frowning:

Hi! I fixed this problems

Ruby files from the lib directory don’t automaticaly loaded/required.

The problem consisted in wrong files name.

Second problem with ‘require’ files (libs or modules). At the first
request to the application necessary files includes. But at the
following requests it doesn’t occur. Partially this problem can be
decided if to use ‘include’ instead ‘require’ but it’s bad solution :frowning:

It is necessary to create a file with needed requires in the
'initializers' folder