You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't figure what's going on here, I originally had solid_errors working fine when I had the tables living in my primary database. I'm trying to move them to a separate stand-alone database just like the README prescribes, but everything just blows up: when an error occurs in the app I get a Could not find table 'solid_errors' instead.
The weird thing is that if I start bin/rails console and look at SolidErrors.connects_to it's nil. If, in the console, I run SolidErrors.connects_to = {database: { writing: :errors}} then everything works fine! I can run SolidErrors::Error.count and 0 is returned.
It's as if the config in my environment files are never running, and solid_errors is falling back to the primary database. But if I didn't have the config in development.rb then the README makes it sound like solid_errors won't run at all? But removing the config from config/development.rb has no effect: I still get the same error. The only way to get past it is to remove the gem completely from my Gemfile.
However, if I have the gem loaded in the development group I need to put this config in config/environments/development.rb as well or else I get the Could not find table error any time some other error occurs. (The README doesn't mention only including the gem in the production group so I assumed you could include it everywhere but it would only log errors if the above config was present, but that doesn't seem to be the case—it always logs if the gem is present!)
I can't figure what's going on here, I originally had solid_errors working fine when I had the tables living in my primary database. I'm trying to move them to a separate stand-alone database just like the README prescribes, but everything just blows up: when an error occurs in the app I get a
Could not find table 'solid_errors'
instead.The weird thing is that if I start
bin/rails console
and look atSolidErrors.connects_to
it'snil
. If, in the console, I runSolidErrors.connects_to = {database: { writing: :errors}}
then everything works fine! I can runSolidErrors::Error.count
and0
is returned.It's as if the config in my environment files are never running, and solid_errors is falling back to the primary database. But if I didn't have the config in
development.rb
then the README makes it sound like solid_errors won't run at all? But removing the config fromconfig/development.rb
has no effect: I still get the same error. The only way to get past it is to remove the gem completely from my Gemfile.Thanks for any help!
The text was updated successfully, but these errors were encountered: