Rails `unitialized constant` for a constant defined in app/classes subdirectory in staging env -


the error happens in :staging environment only

config/initializers/activity_api.rb:4:in 'block in <top (required)>'

rails.application.config.to_prepare   config = yaml.load_file('config/activity.yml')[rails.env] || {}   config.deep_symbolize_keys!   activity::api.config = config end 

and have activity::api class definition in app/classes/activity/api.rb

module activity   class api   ...   end end 

shall explicitely define module activity in app/classes/activity.rb , require files in app/classes/activity or there misunderstand?

maybe app/classes subdirectories not in autoload path?

creating empty module activity help.

you can try user inline class declaration style:

class activity::api end 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -