title: Ecto Cannot Find Repo In Project
body: <p>I'm trying to add Ecto to my project. It's a standard project not generated with <code>--s</code> to add a supervisor.</p>
  
  <p>So far I've used</p>
  
  <p><code>mix ecto.gen.repo -r MyApp.Repo</code></p>
  
  <p>Which generates it just fine.</p>
  
  <p>In my <code>config/dev.exs</code> I have the following:</p>
  
  <pre><code>config :my_app,
    ecto_repos: [MyApp.Repo]
  
  config :my_app, MyApp.Repo,
    adapter: Ecto.Adapters.Postgres,
    database: System.get_env("DATABASE_NAME"),
    username: System.get_env("DATABASE_USER"),
    password: System.get_env("DATABASE_PASSWORD"),
    hostname: System.get_env("DATABASE_HOST"),
    port: System.get_env("DATABASE_PORT")
  </code></pre>
  
  <p>In <code>myapp/repo.ex</code> I have:</p>
  
  <pre><code>defmodule MyApp.Repo do
    use Ecto.Repo, otp_app: :my_app
  end
  </code></pre>
  
  <p>However, when I go to create the repo with </p>
  
  <pre><code>mix ecto.create --env=dev                                                                                                                                                                                    
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>warning: could not find Ecto repos in any of the apps: [:my_app].
  
  You can avoid this warning by passing the -r flag or by setting the
  repositories managed by those applications in your config/config.exs:
  
  config :eos, ecto_repos: [...]
  </code></pre>
  
  <p>This also occurs if I omit the <code>--env</code> flag.</p>
  
  <p>I am hopelessly lost. This is consistent with the getting started guide (minus the supervisor stuff which it did not indicate was required), and I'm stalled out here. Can anyone help me sort this out? Thank you!</p>