{"issue":{"state":"open","created_at":"2011-12-15T05:08:56Z","updated_at":"2011-12-15T05:08:56Z","user":{"gravatar_id":"17e5fbc8b55218df51701c73e37103dd","id":5352,"url":"https://api.github.com/users/juno","avatar_url":"https://secure.gravatar.com/avatar/17e5fbc8b55218df51701c73e37103dd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"juno"},"comments":0,"body":"`Foreman.load_env!` raises NoMethodError if env_file doesn't exist.\r\n\r\n```\r\n>> require 'foreman'\r\n=> true\r\n>> Foreman.load_env! 'nope'\r\nNoMethodError: undefined method `error' for Foreman::Engine:Class\r\n        from /Users/juno/src/foreman/lib/foreman/engine.rb:193:in `block in read_environment_files'\r\n        from /Users/juno/src/foreman/lib/foreman/engine.rb:192:in `each'\r\n        from /Users/juno/src/foreman/lib/foreman/engine.rb:192:in `read_environment_files'\r\n        from /Users/juno/src/foreman/lib/foreman/engine.rb:30:in `load_env!'\r\n        from /Users/juno/src/foreman/lib/foreman.rb:10:in `load_env!'\r\n        from (irb):2\r\n        from /Users/juno/.rbenv/versions/1.9.3-p0/bin/irb:12:in `<main>'\r\n```\r\n\r\nI created spec for this issue, but I can't fix it sorry.\r\n\r\n```\r\n# spec/foreman/engine_spec.rb\r\ndescribe \"Foreman::Engine\" do\r\n  describe \"::load_env!(env_file)\" do\r\n    subject { Foreman::Engine }\r\n    it \"should exit if env_file doesnt exist\" do\r\n      File.exist?(\"./.env\").should be_false\r\n      mock_error(subject, \"No such file: ./.env\") do\r\n        subject.load_env!(\"./.env\")\r\n      end\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nhope this helps.","assignee":null,"id":2563211,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"number":104,"title":"Foreman.load_env! raises NoMethodError if env_file doesn't exist","html_url":"https://github.com/ddollar/foreman/issues/104","closed_at":null,"milestone":null,"url":"https://api.github.com/repos/ddollar/foreman/issues/104"},"action":"opened"}