{"action":"created","issue":{"url":"https://api.github.com/repos/bkeepers/dotenv/issues/178","labels_url":"https://api.github.com/repos/bkeepers/dotenv/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/bkeepers/dotenv/issues/178/comments","events_url":"https://api.github.com/repos/bkeepers/dotenv/issues/178/events","html_url":"https://github.com/bkeepers/dotenv/issues/178","id":63047262,"number":178,"title":"dotenv-rails not loaded early enough","user":{"login":"mathieujobin","id":99191,"avatar_url":"https://avatars.githubusercontent.com/u/99191?v=3","gravatar_id":"","url":"https://api.github.com/users/mathieujobin","html_url":"https://github.com/mathieujobin","followers_url":"https://api.github.com/users/mathieujobin/followers","following_url":"https://api.github.com/users/mathieujobin/following{/other_user}","gists_url":"https://api.github.com/users/mathieujobin/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieujobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieujobin/subscriptions","organizations_url":"https://api.github.com/users/mathieujobin/orgs","repos_url":"https://api.github.com/users/mathieujobin/repos","events_url":"https://api.github.com/users/mathieujobin/events{/privacy}","received_events_url":"https://api.github.com/users/mathieujobin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-19T17:27:59Z","updated_at":"2015-03-19T17:32:55Z","closed_at":null,"body":"I am having an issue similar to this other one https://github.com/bkeepers/dotenv/issues/19\r\n\r\nusing dotenv 2.0.0 in a Rails 4.1.9 application\r\n\r\nthe problem comes from the fact I tried to use a environment variable early in my Rails Engine initializer.\r\n\r\nthe engine is loaded through a gem.\r\n\r\nI tried moving the `gem 'dotenv-rails'` to the engine gemspec\r\nI tried doing a `require 'dotenv-rails'` above my usage, but no luck,...\r\n\r\nany idea what else I could be doing ?\r\nthanks\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bkeepers/dotenv/issues/comments/83687859","html_url":"https://github.com/bkeepers/dotenv/issues/178#issuecomment-83687859","issue_url":"https://api.github.com/repos/bkeepers/dotenv/issues/178","id":83687859,"user":{"login":"mathieujobin","id":99191,"avatar_url":"https://avatars.githubusercontent.com/u/99191?v=3","gravatar_id":"","url":"https://api.github.com/users/mathieujobin","html_url":"https://github.com/mathieujobin","followers_url":"https://api.github.com/users/mathieujobin/followers","following_url":"https://api.github.com/users/mathieujobin/following{/other_user}","gists_url":"https://api.github.com/users/mathieujobin/gists{/gist_id}","starred_url":"https://api.github.com/users/mathieujobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathieujobin/subscriptions","organizations_url":"https://api.github.com/users/mathieujobin/orgs","repos_url":"https://api.github.com/users/mathieujobin/repos","events_url":"https://api.github.com/users/mathieujobin/events{/privacy}","received_events_url":"https://api.github.com/users/mathieujobin/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T17:32:55Z","updated_at":"2015-03-19T17:32:55Z","body":"I just found one solution.\r\n\r\non top of my `lib/engine.rb` I do \r\n\r\n```ruby\r\nrequire 'dotenv-rails'\r\nDotenv.load('.env')\r\n```\r\n\r\nunless you can suggest a better solution, you can close my issue.\r\n\r\nthanks\r\n\r\nCC: @cedricboulanger "}}