title: function Poison.encode_to_iodata!/1 is undefined
body: <p>I'm working on an elixir API for which I'm using JaSerializer but it's giving me an error something like this while I'm calling post API.</p>
  
  <pre><code>function Poison.encode_to_iodata!/1 is undefined (module Poison is not available)
  </code></pre>
  
  <p>But In my config file, I've added Poison and also recompile using mime</p>
  
  <pre><code>mix deps.clean mime --build
  mix deps.get 
  </code></pre>
  
  <p>Also the api which I'm calling is getting inserted into database but it's not responding any Json and giving me that error.</p>
  
  <p>here's my config file:</p>
  
  <pre><code>use Mix.Config
  
  config :banking,
    ecto_repos: [Banking.Repo]
  
  # Configures the endpoint
  config :banking, BankingWeb.Endpoint,
    url: [host: "localhost"],
    secret_key_base: "LMcWbj2QramA5ulI0MZnFobOtrKg/Z2x/gmDl6NwH7hxUbRksPzZjuXwyk8QKGyx",
    render_errors: [view: BankingWeb.ErrorView, accepts: ~w(json)],
    pubsub: [name: Banking.PubSub, adapter: Phoenix.PubSub.PG2]
  
  # Configures Elixir's Logger
  config :logger, :console,
    format: "$time $metadata[$level] $message\n",
    metadata: [:request_id]
  
  config :mime, :types, %{
    "application/vnd.api+json" =&gt; ["json-api"]
  }
  
  config :phoenix, :format_encoders,
    "json-api": Poison
  # Use Jason for JSON parsing in Phoenix
  config :phoenix, :json_library, Jason
  
  # Import environment specific config. This must remain at the bottom
  # of this file so it overrides the configuration defined above.
  import_config "#{Mix.env()}.exs"
  </code></pre>
  
  <p>This is the error I'm getting </p>
  
  <pre><code>[error] #PID&lt;0.583.0&gt; running BankingWeb.Endpoint (connection #PID&lt;0.582.0&gt;, stream id 1) terminated
  Server: localhost:4000 (http)
  Request: POST /api/banks
  ** (exit) an exception was raised:
      ** (UndefinedFunctionError) function Poison.encode_to_iodata!/1 is undefined (module Poison is not available)
          Poison.encode_to_iodata!(%{"data" =&gt; %{"attributes" =&gt; %{"name" =&gt; "arvind singh"}, "id" =&gt; "19", "type" =&gt; "bank"}, "jsonapi" =&gt; %{"version" =&gt; "1.0"}})
          (phoenix) lib/phoenix/controller.ex:729: Phoenix.Controller.__put_render__/5
          (phoenix) lib/phoenix/controller.ex:746: Phoenix.Controller.instrument_render_and_send/4
          (banking) lib/banking_web/controllers/bank_controller.ex:1: BankingWeb.BankController.action/2
          (banking) lib/banking_web/controllers/bank_controller.ex:1: BankingWeb.BankController.phoenix_controller_pipeline/2
          (phoenix) lib/phoenix/router.ex:288: Phoenix.Router.__call__/2
          (banking) lib/banking_web/endpoint.ex:1: BankingWeb.Endpoint.plug_builder_call/2
          (banking) lib/plug/debugger.ex:122: BankingWeb.Endpoint."call (overridable 3)"/2
          (banking) lib/banking_web/endpoint.ex:1: BankingWeb.Endpoint.call/2
          (phoenix) lib/phoenix/endpoint/cowboy2_handler.ex:42: Phoenix.Endpoint.Cowboy2Handler.init/4
          (cowboy) /Users/apple/Documents/bankingassignment/banking/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
          (cowboy) /Users/apple/Documents/bankingassignment/banking/deps/cowboy/src/cowboy_stream_h.erl:320: :cowboy_stream_h.execute/3
          (cowboy) /Users/apple/Documents/bankingassignment/banking/deps/cowboy/src/cowboy_stream_h.erl:302: :cowboy_stream_h.request_process/3
          (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
  </code></pre>
  
  <p>Mix deps function</p>
  
  <pre><code>defp deps do
      [
        {:phoenix, "~&gt; 1.4.9"},
        {:phoenix_pubsub, "~&gt; 1.1"},
        {:phoenix_ecto, "~&gt; 4.0"},
        {:ecto_sql, "~&gt; 3.1"},
        {:postgrex, "&gt;= 0.0.0"},
        {:gettext, "~&gt; 0.11"},
        {:jason, "~&gt; 1.0"},
        {:plug_cowboy, "~&gt; 2.0"},
        {:ja_serializer, github: "vt-elixir/ja_serializer"}
      ]
    end
  </code></pre>