theFirehoseProject / Splurty-Phoenix

28 stars 7 forks source link

Step 4 fails without server restart #1

Open JHKennedy4 opened 9 years ago

JHKennedy4 commented 9 years ago

not sure if this is the place to put this, but when I was working through the tutorial I encountered a few minutes of consternation trying to debug my code that was identical to the tutorial to that point.

When I attempted to hit localhost:4000/quotes after creating the QuotesController index function, I saw the following error:

[error] #PID<0.623.0> running Splurty.Endpoint terminated
Server: localhost:4000 (http)
Request: GET /quotes
** (exit) an exception was raised:
    ** (UndefinedFunctionError) undefined function: Ecto.Repo.Backend.all/4 (module Ecto.Repo.Backend is not available)
        Ecto.Repo.Backend.all(Repo, Ecto.Adapters.Postgres, Splurty.Quote, [])
        web/controllers/quote_controller.ex:15: Splurty.QuoteController.index/2
        web/controllers/quote_controller.ex:1: Splurty.QuoteController.phoenix_controller_pipeline/2
        (splurty) lib/phoenix/router.ex:2: Splurty.Router.call/2
        (plug) lib/plug/debugger.ex:104: Plug.Debugger.wrap/3
        (phoenix) lib/phoenix/endpoint/error_handler.ex:43: Phoenix.Endpoint.ErrorHandler.wrap/3
        (splurty) lib/splurty/endpoint.ex:1: Splurty.Endpoint.phoenix_endpoint_pipeline/2
     (plug) lib/plug/debugger.ex:104: Plug.Debugger.wrap/3

Restarting the server fixed it, but it seems like something that should either be called out, or not occur at all. There are few things more painful than hunting for a typo that doesn't actually exist.

kenmazaika commented 9 years ago

Thanks for the heads up, John. We should look into if we need to explicitly mention about restarting the server.