title: How do I load an Elixir library into iex without adding it to a project's mix.exs deps?
body: <p>I want to tryout the Poison json module without creating a mix project. </p>
  
  <p>How do I install it and make it available in iex via import?</p>
  
  <p>I have been able to add it to a project, then use it after going into the project directory and using iex -S mix:</p>
  
  <pre><code>tbrowne@LILJEN:~/code/elixirTry/pj$ cat mix.exs
  defmodule Pj.Mixfile do
    use Mix.Project
  
    def project do
      [app: :pj,
       version: "0.0.1",
       elixir: "~&gt; 1.2",
       build_embedded: Mix.env == :prod,
       start_permanent: Mix.env == :prod,
       deps: deps]
    end
  
    # Configuration for the OTP application
    #
    # Type "mix help compile.app" for more information
    def application do
      [applications: [:logger]]
    end
  
    # Dependencies can be Hex packages:
    #
    #   {:mydep, "~&gt; 0.3.0"}
    #
    # Or git/path repositories:
    #
    #   {:mydep, git: "https://github.com/elixir-lang/mydep.git", tag: "0.1.0"}
    #
    # Type "mix help deps" for more examples and options
    defp deps do
      [{:poison, "~&gt; 2.0"}]
    end
  end
  tbrowne@LILJEN:~/code/elixirTry/pj$ cat lib/pj.ex
  defmodule Person do
    @derive [Poison.Encoder]
    defstruct [:name, :age]
  end
  
  defmodule Pj do
    xx = Poison.encode!(%Person{name: "Devin Torres", age: 27})
  end
  
  tbrowne@LILJEN:~/code/elixirTry/pj$ iex -S mix
  Erlang/OTP 18 [erts-7.2] [source-e6dd627] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]
  
  Interactive Elixir (1.2.3) - press Ctrl+C to exit (type h() ENTER for help)
  iex(1)&gt; import Poison
  nil
  iex(2)&gt;
  </code></pre>
  
  <p>However if I just go into a normal iex in a generic directory then I can't seem to access the Poison library:</p>
  
  <pre><code>iex(4)&gt; import IO
  nil
  iex(5)&gt; puts("hello")
  hello
  :ok
  iex(6)&gt; import Poison
  ** (CompileError) iex:6: module Poison is not loaded and could not be found
  </code></pre>
  
  <p>Also, how do I install a library globally from github?</p>