I'm working on a Rails (3.2) app and I need to execute some tasks when the app boots.
Since I want to keep the logic in a separate file I have also create lib/helinium.rb that looks like (with dummy run method)
class Helinium
def self.run
puts "running ...."
end
end
And I have created a simple initializer file config/initializers/perform_checks.rb
Helinium.run
And everything seems fine. Now I wish to put the Helinium class within a module so the two files look respectively like
module Elemens
class Helinium
def self.run
puts "running ...."
end
end
end
and
Elemens::Helinium.run
but when I try to boot the app I get
uninitialized constant Elemens (NameError)
Am I missing something here? Why the module is not found?
Thanks and have a nice day.