-
Couldn't load subscription status.
- Fork 177
Description
Hello,
I have a problem setting up the gem if I want to configure it from the initializers folder.
So, when I configure the gem inside the development.rb file everything is alright
example working config:
Rails.application.configure do
config.web_console.permissions = ENV.fetch('ALLOWED_IP', nil)
endbut when I do a similar thing in my config/initializers/web_console.rb like so:
# frozen_string_literal: true
if Rails.env.development?
Rails.application.configure do
config.web_console.permissions = ENV.fetch('ALLOWED_IP', nil)
end
endthe console command is not working and the console is not appearing when an error is raised or when I manually add the console command e.g. in my controller actions.
Have you seen a problem like this before? Or do you already know that configuring the gem from config/initializers is not possible maybe?
EDIT:
After doing some console outputs it seems to me that it's just an ordering of things.
- First, it's the
config/environments/development.rbthat runs - Second it's whatever is inside the
web-consolegemlib/web_console/railtie.rbthat runs - Third it's what's in the
config/initializers/web_console.rb(This is the file where I'm trying to configureweb-consolein my project) that is running
However, the configuration I'm setting in the config/initializers/web_console.rb is not picked up by the gem.