I place a file name g.rb in side Rails.root/lib
folder
The file content is like this:
module Google
end
Then I add
I had a similar problem with getting my module to run on Heroku. In addition to the autoload naming convention stated by Stephen C, I found out that the module code must be require
'd due to a threadsafe
assumption made by the Rails' production environment on Heroku (even though threadsafe
was commented out in my production.rb
configuration file.) As soon as I require
'd the module file before calling include
on the module, everything started to work.
require 'mymodule'
include Mymodule
Please take a look at this excellent article on the subject of getting Modules to load correctly in Heroku (production).