Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined function unlock_path/2 #373

Open
skull-squadron opened this issue Sep 8, 2018 · 2 comments
Open

undefined function unlock_path/2 #373

skull-squadron opened this issue Sep 8, 2018 · 2 comments

Comments

@skull-squadron
Copy link

Similar to #323

Stacktrace

$ mix ecto.setup
Compiling 32 files (.ex)

== Compilation error in file lib/bank_of_meetup_web/views/coherence/unlock_view.ex ==
** (CompileError) lib/bank_of_meetup_web/templates/coherence/unlock/new.html.eex:3: undefined function unlock_path/2
    (stdlib) lists.erl:1338: :lists.foreach/2
    (stdlib) erl_eval.erl:677: :erl_eval.do_apply/6
    (elixir) lib/kernel/parallel_compiler.ex:206: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6

mix.exs

  def application do
    [
      mod: {BankOfMeetup.Application, []},
      extra_applications: [:logger, :runtime_tools, :coherence]
    ]
  end

  defp deps do
    [
      {:phoenix, "~> 1.3.4"},
      {:phoenix_pubsub, "~> 1.0"},
      {:phoenix_ecto, "~> 3.2"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 2.10"},
      {:phoenix_live_reload, "~> 1.0", only: :dev},
      {:coherence, "~> 0.5"},
      {:gettext, "~> 0.11"},
      {:cowboy, "~> 1.0"}
    ]
  end

Generator invocation

mix coh.install --full-invitable && mix ecto.setup

Config

# %% Coherence Configuration %%   Don't remove this line
config :coherence,
  user_schema: BankOfMeetup.Coherence.User,
  repo: BankOfMeetup.Repo,
  module: BankOfMeetup,
  web_module: BankOfMeetupWeb,
  router: BankOfMeetupWeb.Router,
  messages_backend: BankOfMeetupWeb.Coherence.Messages,
  logged_out_url: "/",
  registration_permitted_attributes: ["email","name","password","current_password","password_confirmation"],
  invitation_permitted_attributes: ["name","email"],
  password_reset_permitted_attributes: ["reset_password_token","password","password_confirmation"],
  session_permitted_attributes: ["remember","email","password"],
  email_from_name: "Your Name",
  email_from_email: "yourname@example.com",
  opts: [:authenticatable, :recoverable, :lockable, :trackable, :unlockable_with_token, :invitable, :registerable]

config :coherence, BankOfMeetupWeb.Coherence.Mailer,
  adapter: Swoosh.Adapters.Sendgrid,
  api_key: "your api key here"
# %% End Coherence Configuration %%
@smpallen99
Copy link
Owner

Looks like a bug

@castengo
Copy link

This happened to me. Did you add the coherence routes to your router before you ran mix ecto.setup? That fixed mine.

  # Add this block
  scope "/" do
    pipe_through :browser
    coherence_routes()
  end

  # Add this block
  scope "/" do
    pipe_through :protected
    coherence_routes :protected
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants