title: Why doesn't my Erlang shell load rebar dependencies?
body: <p>I have a simple project using rebar with this config:</p>
  
  <pre><code>  {sub_dirs, [
                "gen",
                "apps/basilisk_server",
                "rel"
                "apps/*"
                "ebin"
                "deps/*/ebin"
               ]}.
  
    {erl_opts, [debug_info, fail_on_warning]}.
  
  
    { 
      deps, 
      [
       { email_address, ".*", { git, "git://github.com/mswimmer/erlang-email-address.git", "master"}},
  
       { gen_smtp     , ".*", { git, "https://github.com/Vagabond/gen_smtp.git"          , "master"}},
       { pat          , ".*", { git, "https://github.com/selectel/pat.git"               , "master"}},
       { thrift          , ".*", { git, "https://github.com/MustyMustelidae/ThriftErl.git", "master"}}
      ]
    }.
  </code></pre>
  
  <p>My directory structure is:</p>
  
  <pre><code>            +---.rebar
              +---deps
              |   +---edown
              |   |   +---.rebar
              |   |   +---bin
              |   |   +---doc
              |   |   +---ebin
              |   |   +---priv
              |   |   |   \---scripts
              |   |   +---samples
              |   |   \---src
              |   +---email_address
              |   |   +---.rebar
              |   |   +---ebin
              |   |   +---src
              |   |   \---test
              |   +---gen_smtp
              |   |   +---.rebar
              |   |   +---ebin
              |   |   +---src
              |   |   +---test
              |   |   \---testdata
              |   +---gproc
              |   |   +---.rebar
              |   |   +---doc
              |   |   +---ebin
              |   |   +---include
              |   |   +---patches
              |   |   |   +---gen_leader
              |   |   |   +---kernel
              |   |   |   \---stdlib
              |   |   +---priv
              |   |   +---reference
              |   |   +---src
              |   |   +---test
              |   |   |   \---eqc
              |   |   \---tetrapak
              |   +---lager
              |   |   +---.rebar
              |   |   +---ebin
              |   |   +---include
              |   |   +---src
              |   |   \---test
              |   +---pat
              |   |   +---.rebar
              |   |   +---ebin
              |   |   +---include
              |   |   \---src
              |   +---proper
              |   |   +---.rebar
              |   |   +---doc
              |   |   +---ebin 
              |   |   +---examples
              |   |   +---include
              |   |   +---src
              |   |   \---test
              |   +---tempo
              |   |   +---.rebar
              |   |   +---c_src
              |   |   +---doc
              |   |   |   \---utf8
              |   |   +---ebin
              |   |   +---src
              |   |   \---test
              |   \---thrift
              |       +---.rebar
              |       +---ebin 
              |       +---include
              |       +---out
              |       |   \---production
              |       |       \---erl
              |       +---src
              |       \---test
              +---ebin &lt;--- My .app/.beam
              \---src &lt;--- My source files
                  \---gen &lt;---More source files
  </code></pre>
  
  <p>(Sorry for the wall)
  Each of the dependencies has a .app file in it's ebin folder, and I'm running the command <code>erl -pa apps/*/ebin -pa ebin -pa deps/*/ebin</code>. I expect I should be able to run <code>application:ensure_all_started(somedep).</code> where "somedep" is the name of a dependency with a .app defined in it's ebin folder. But when I run it for any of them I get the error <code>{error,{somedep,{"no such file or directory","somedep.app"}}}</code>. When I run it for my own application I get the correct response ({ok,_}). Because I can't start the dependencies' applications, my own application fails with an <code>undef</code> error. Am I missing some step to register my .app files with the shell?</p>