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

Rails Environment-specific Configuration #1

Open
marktran opened this issue Jan 23, 2014 · 4 comments
Open

Rails Environment-specific Configuration #1

marktran opened this issue Jan 23, 2014 · 4 comments

Comments

@marktran
Copy link

Is there any way to have different configurations for different Rails environments?

if Rails.env.production?
  disallow :none
else
  disallow :all
end

Error:

NoMethodError (undefined method `env' for HumanPower::Rails:Module):
  config/robots.rb:1:in `block in robots'
  lib/silverpop_middleware.rb:13:in `call'
  lib/health_check_middleware.rb:10:in `call'
@lassebunk
Copy link
Owner

Yes, try ::Rails instead of Rails.

I'll look into this.

Thanks.

@PikachuEXE
Copy link
Contributor

I guess it's not a bug
Since you are supposed to use :: if you want top level constant

@PikachuEXE
Copy link
Contributor

@lassebunk Close or fix?_?

@lassebunk
Copy link
Owner

This will be fixed. It's unintentional, so it's kind of a bug. 😊

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

3 participants