{"action":"created","issue":{"url":"https://api.github.com/repos/bkeepers/dotenv/issues/200","labels_url":"https://api.github.com/repos/bkeepers/dotenv/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/bkeepers/dotenv/issues/200/comments","events_url":"https://api.github.com/repos/bkeepers/dotenv/issues/200/events","html_url":"https://github.com/bkeepers/dotenv/issues/200","id":95260435,"number":200,"title":"Not respecting env variables set out of .env","user":{"login":"zdennis","id":967,"avatar_url":"https://avatars.githubusercontent.com/u/967?v=3","gravatar_id":"","url":"https://api.github.com/users/zdennis","html_url":"https://github.com/zdennis","followers_url":"https://api.github.com/users/zdennis/followers","following_url":"https://api.github.com/users/zdennis/following{/other_user}","gists_url":"https://api.github.com/users/zdennis/gists{/gist_id}","starred_url":"https://api.github.com/users/zdennis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdennis/subscriptions","organizations_url":"https://api.github.com/users/zdennis/orgs","repos_url":"https://api.github.com/users/zdennis/repos","events_url":"https://api.github.com/users/zdennis/events{/privacy}","received_events_url":"https://api.github.com/users/zdennis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-15T18:30:33Z","updated_at":"2015-09-02T00:11:41Z","closed_at":null,"body":"I was trying to override a env variable set in my local .env when running a rake task from the command line, but it didn't appear to take.\r\n\r\n```\r\nrails --version   # => Rails 4.2.1\r\n\r\nrails new wat && \r\n  cd wat && \r\n  echo \"gem 'dotenv-rails'\" >> Gemfile && \r\n  bundle && \r\n  echo 'FOO=bar' > .env\r\n\r\n# This should print out bar\r\nbundle exec rails runner \"puts ENV['FOO']\"\r\n\r\n# I was expecting this to print out baz, but it printed out bar\r\nFOO=baz bundle exec rails runner \"puts ENV['FOO']\"\r\n\r\n# Also tried this but it too printed out bar\r\nexport FOO=baz && bundle exec rails runner \"puts ENV['FOO']\"\r\n```\r\n\r\nAm I expecting the right behavior?\r\n"},"comment":{"url":"https://api.github.com/repos/bkeepers/dotenv/issues/comments/136898095","html_url":"https://github.com/bkeepers/dotenv/issues/200#issuecomment-136898095","issue_url":"https://api.github.com/repos/bkeepers/dotenv/issues/200","id":136898095,"user":{"login":"oboxodo","id":8324,"avatar_url":"https://avatars.githubusercontent.com/u/8324?v=3","gravatar_id":"","url":"https://api.github.com/users/oboxodo","html_url":"https://github.com/oboxodo","followers_url":"https://api.github.com/users/oboxodo/followers","following_url":"https://api.github.com/users/oboxodo/following{/other_user}","gists_url":"https://api.github.com/users/oboxodo/gists{/gist_id}","starred_url":"https://api.github.com/users/oboxodo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oboxodo/subscriptions","organizations_url":"https://api.github.com/users/oboxodo/orgs","repos_url":"https://api.github.com/users/oboxodo/repos","events_url":"https://api.github.com/users/oboxodo/events{/privacy}","received_events_url":"https://api.github.com/users/oboxodo/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T00:11:41Z","updated_at":"2015-09-02T00:11:41Z","body":"I think I have the same (or similar) problem.\r\n\r\n```bash\r\n$ ./bin/rails --version\r\nRails 4.1.13\r\n$ ./bin/spring --version\r\nSpring version 1.3.6\r\n$ grep dotenv Gemfile.lock\r\n    dotenv (2.0.2)\r\n    dotenv-rails (2.0.2)\r\n      dotenv (= 2.0.2)\r\n  dotenv-rails\r\n$ ./bin/spring status\r\nSpring is not running.\r\n$ grep DEFAULT_NAV_VERSION .env*\r\nDEFAULT_NAV_VERSION=1\r\n$ ./bin/rails runner \"puts ENV['DEFAULT_NAV_VERSION']\"\r\n1\r\n$ ./bin/spring status\r\nSpring is running:\r\n\r\n25576 spring server | Quimbee | started 21 secs ago\r\n25578 spring app    | Quimbee | started 21 secs ago | development mode\r\n$ DEFAULT_NAV_VERSION=3 ./bin/rails runner \"puts ENV['DEFAULT_NAV_VERSION']\"\r\n1\r\n$ ./bin/spring stop\r\nSpring stopped.\r\n$ DEFAULT_NAV_VERSION=3 ./bin/rails runner \"puts ENV['DEFAULT_NAV_VERSION']\"\r\n3\r\n$ ./bin/rails runner \"puts ENV['DEFAULT_NAV_VERSION']\"\r\n\r\n$ ./bin/spring status\r\nSpring is running:\r\n\r\n25671 spring server | Quimbee | started 33 secs ago\r\n25672 spring app    | Quimbee | started 33 secs ago | development mode\r\n```\r\n\r\nSomething is not right, and it seems to be related to spring..."}}