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
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
It is necessary to create a file with needed requires in the
‘initializers’ folder
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.