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

Error when trying to generate new layout #54

Open
kevinl05 opened this issue Aug 13, 2017 · 5 comments
Open

Error when trying to generate new layout #54

kevinl05 opened this issue Aug 13, 2017 · 5 comments
Labels

Comments

@kevinl05
Copy link

kevinl05 commented Aug 13, 2017

Freshly created Phoenix project, when trying to run mix phoenix.gen.layout.slime I'm receiving this error

** (UndefinedFunctionError) function Mix.Phoenix.copy_from/5 is undefined or private. Did you mean one of:

  * copy_from/4

Mix.Phoenix.copy_from([".", :phoenix_slime], "priv/templates/phoenix.gen.layout.slime", "", [application_module: "ApplicationName"], [{:eex, "app.html.eex", "web/templates/layout/app.html.slim"}])
lib/mix/tasks/phoenix.gen.layout.slime.ex:16: Mix.Tasks.Phoenix.Gen.Layout.Slime.run/1
(mix) lib/mix/task.ex:301: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:75: Mix.CLI.run_task/2
(elixir) lib/code.ex:376: Code.require_file/2
@doomspork
Copy link
Member

Howdy @Spinsus, have you tried master yet?

@ivanxuu
Copy link

ivanxuu commented Oct 11, 2017

For me using master like this in mix.exs works fine:

 defp devs do
   ...
   {:phoenix_slime, github: "slime-lang/phoenix_slime"}
   ...
 end

Maybe would be worth it to bumb the version available at hex.pm (0.9.0)?

@Gawyn
Copy link

Gawyn commented Feb 22, 2018

I am having the same issue, and running the slime version in Github solves it.

@neneboe
Copy link

neneboe commented Mar 10, 2018

Also, the command generates the file in the wrong directory for the phoenix 1.3 default directory structure. Currently generates in web/templates/layout, should generate in lib/[app name]_web/templates/layout

@ramaboo
Copy link

ramaboo commented Apr 2, 2018

slime 0.6.0 new phoenix 132 app fails with

➜  skippy git:(master) ✗ mix phoenix.gen.layout.slime
** (UndefinedFunctionError) function Mix.Phoenix.copy_from/5 is undefined or private. Did you mean one of:

      * copy_from/4

    Mix.Phoenix.copy_from([".", :phoenix_slime], "priv/templates/phoenix.gen.layout.slime", "", [application_module: "ApplicationName"], [{:eex, "app.html.eex", "web/templates/layout/app.html.slim"}])
    lib/mix/tasks/phoenix.gen.layout.slime.ex:16: Mix.Tasks.Phoenix.Gen.Layout.Slime.run/1
    (mix) lib/mix/task.ex:314: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:80: Mix.CLI.run_task/2
    (elixir) lib/code.ex:677: Code.require_file/2

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

No branches or pull requests

6 participants