chrismccord / phoenix_haml

Phoenix Template Engine for Haml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined function: PhoenixHaml.Engine.compile/2

suranyami opened this issue · comments

Following the configuration example in the README used to work. But now, after upgrading to the latest Phoenix, Elixir, etc, I get this:

== Compilation error on file web/views/page_view.ex ==
** (UndefinedFunctionError) undefined function: PhoenixHaml.Engine.compile/2
    PhoenixHaml.Engine.compile("web/templates/page/error.html.haml", "error.html")
    (phoenix) lib/phoenix/template.ex:266: Phoenix.Template.compile/2
    (phoenix) lib/phoenix/template.ex:125: Phoenix.Template."-MACRO-__before_compile__/2-lc$^0/1-0-"/2
    (phoenix) expanding macro: Phoenix.Template.__before_compile__/1
    web/views/page_view.ex:1: Poker.PageView (module)

Any thoughts on how to fix this?

Master now supports Phoenix master (0.6.0-dev). Please give that a shot and I'll update to a fresh release once phoenix 0.6.0 is out:

{:phoenix_haml, github: "chrismccord/phoenix_haml"}

Please reopen if that doesn't get things up and running for you.

Thanks. That sorted it.

i think this issue become alive after this commit f3a857e

2 days ago everything was ok then i updated deps and it started throwing these errors

== Compilation error on file web/views/layout_view.ex ==
** (UndefinedFunctionError) undefined function: PhoenixHaml.Engine.compile/2 (module PhoenixHaml.Engine is not available)
PhoenixHaml.Engine.compile("web/templates/layout/application.html.haml", "application.html")
(phoenix) lib/phoenix/template.ex:320: Phoenix.Template.compile/2
(phoenix) lib/phoenix/template.ex:154: Phoenix.Template."-MACRO-before_compile/2-fun-0-"/3
(elixir) lib/enum.ex:1261: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix) expanding macro: Phoenix.Template.before_compile/1
web/views/layout_view.ex:1: Blog.LayoutView (module)

== Compilation error on file web/views/page_view.ex ==
** (UndefinedFunctionError) undefined function: PhoenixHaml.Engine.compile/2 (module PhoenixHaml.Engine is not available)
PhoenixHaml.Engine.compile("web/templates/page/index.html.haml", "index.html")
(phoenix) lib/phoenix/template.ex:320: Phoenix.Template.compile/2
(phoenix) lib/phoenix/template.ex:154: Phoenix.Template."-MACRO-before_compile/2-fun-0-"/3
(elixir) lib/enum.ex:1261: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix) expanding macro: Phoenix.Template.before_compile/1
web/views/page_view.ex:1: Blog.PageView (module)

@programisti do jump to 1.1 you need to be on Phoenix 13+. Lock phoenix_ham at 1.0 otherwise