Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wishlist: make environments configurable #7

Open
jensb opened this issue Mar 29, 2011 · 2 comments
Open

wishlist: make environments configurable #7

jensb opened this issue Mar 29, 2011 · 2 comments

Comments

@jensb
Copy link

jensb commented Mar 29, 2011

Hello,

I have several development environments (devel_foo, devel_bar, ...) because we develop on different local machines (OS X notebook, Linux server, Windows PC, ...) which all have subtle differences in configuration.
I would love if the environments where silent-postgres is enabled could be configured. Or, alternatively, if the plugin could determine whether Rails::Application.config.log_level is set to :debug, and only then enable itself. (Only during gem initialization, the Rails module is not yet defined).

Thanks :-)

@dolzenko
Copy link
Owner

Hi, sorry for the late response, not sure how do you expect it to work, for example by putting in config/initializers/silent-postgres.rb something like:

# A list of environments in which silencing should take place
SilentPostgres.development_environments = ["devel_foo", "devel_bar"]

? I guess in your case you can't use just Bundler groups to achieve that effect?

@jensb
Copy link
Author

jensb commented Sep 22, 2012

Hi - sorry to leave this answer so long. In our "devel_online" and "staging" environments, I am using silent-postgres but it has no effect. I think this is because of if Rails.env.development? || Rails.env.test? in silent-postgres.rb - which doesn't fire when the environment is "devel_online".
Something like an initializer would be really great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants