Open khataev opened 1 year ago
Hey, sorry for the long wait.
It seems that if you already have Rails application initialized, then require "yabeda"
tries to require its railtie before declaring essential methods of itself, and that railtie tries to execute after_initialize
block in-place.
Probably, moving this railtie require to the end of file should help.
Hi! This question is mostly because of educational purposes, so not a real issue. Still, the problem is the following. I was looking in a ways to decrease memory consumption and tried to implement conditional loading of this gem and
yabeda-prometheus
gem based on environment variable. So it look like this:Gemfile
config/puma.rb
routes.rb
but all attempts to require these gems manually lead to this error:
not sure to understand how everything works when those gems are loaded by bundler, but looks like there is something non-trivial around
yabeda
gem require (on which those two depend). Can you please explain?