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 app gems unaware of Rails.application in config files; is nil #3

Open
umdstu opened this issue May 28, 2014 · 1 comment
Open

Comments

@umdstu
Copy link

umdstu commented May 28, 2014

After implementing this gem and the required changes, I verified everything worked. I then added a custom gem to the Gemfile that happens to load one of the config/*.yml files. As expected, the yml file has
<%= Rails.application.secrets.key_name %>

but when the gem tries to load the yml, It errors:

undefined method  `secrets' for nil:NilClass (NoMethodError) 

Is there a way to make the gem aware of Rails.application?

@pixeltrix
Copy link
Owner

The only way I can think of is you need to load Rails before the gem tries to load the YAML file - without seeing the Gemfile, etc it's hard to say whether it's possible

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