elixir - mix phx.gen.html generator immediately causes compile errors? -


i'm making new phoenix app first time in year, , trying handle on that's changed regards context etc.

my first order of business creating database table can track email signups, put command in:

mix phx.gen.html signups email emails email:string name:string data:text

and put new routes in router.ex. before can migrate, error:

== compilation error in file lib/appname/views/email_view.ex == ** (compileerror) lib/appname/views/email_view.ex:2: module appnameweb not loaded , not found     (elixir) expanding macro: kernel.use/2     lib/appname/views/email_view.ex:2: appnameweb.emailview (module)     (elixir) lib/kernel/parallel_compiler.ex:121: anonymous fn/4 in kernel.parallelcompiler.spawn_compilers/1 

i have appname.web other places in app, generator created new module called appnameweb doesn't seem loaded anywhere?

if find , replace in project appname.web appnameweb, lets me migrate still fails load new emails index page.

request: /emails ** (exit) exception raised:     ** (undefinedfunctionerror) function appname.emailcontroller.init/1 undefined (module appname.emailcontroller not available)         appname.emailcontroller.init(:index)         (appname) web/router.ex:1: anonymous fn/1 in appname.router.__match_route__/4         (phoenix) lib/phoenix/router.ex:278: phoenix.router.__call__/1         (appname) lib/appname/endpoint.ex:1: appname.endpoint.plug_builder_call/2         (appname) lib/plug/debugger.ex:99: appname.endpoint."call (overridable 3)"/2         (appname) lib/appname/endpoint.ex:1: appname.endpoint.call/2         (plug) lib/plug/adapters/cowboy/handler.ex:15: plug.adapters.cowboy.handler.upgrade/4         (cowboy) /users/user/dev/appname/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4 

so supposed have both appname.web , appnameweb? i'm not sure what's supposed go more, , fact generator generates broken code isn't helping...


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -