I am working on a Rails application (3.2) and I need to complete some tasks when loading the application.
Since I want to save the logic in a separate file, I also create lib / helinium.rb that looks (using the false start method)
class Helinium def self.run puts "running ...." end end
And I created a simple initializer file config / initializers / perform_checks.rb
Helinium.run
And everything seems beautiful. Now I want to put the Helinium class in the module so that both files look accordingly as
module Elemens class Helinium def self.run puts "running ...." end end end
and
Elemens::Helinium.run
but when I try to download the application, I get
uninitialized constant Elemens (NameError)
Am I missing something? Why is the module not found?
Thanks and have a good day.
source share