2016-10-14 16 views
1

我缺少凤凰专用混音任务,例如混合phoenix.gen.html缺少凤凰专用混音任务/发电机

$ mix help | grep的-i凤凰

混合local.phoenix#更新凤凰本地

混合phoenix.new#创建一个新的凤凰V1.2.1应用

$混合-v

二郎/ OTP 19 [erts-8.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Mix 1.3.4

$酏-v

二郎/ OTP 19 [专家评审组-8.1] [源] [64位] [SMP:8:8] [异步线程:10] [HIPE] [内核级调查:假] [DTrace的]

药剂1.3.4

我已经重新安装了二郎神,节点,花好月圆,凤凰城在我的Mac(使用BREW)和似乎没有任何解决问题。

这里是凤凰app目录

$ mix phoenix.new hello 

$ cd hello 

$ ls 
README.md  brunch-config.js deps   mix.exs   node_modules  priv   web _build   config   lib   mix.lock  package.json  test 

$ mix -h | fgrep phoenix 
mix local.phoenix  # Updates Phoenix locally 
mix phoenix.new  # Creates a new Phoenix v1.2.1 application 

回答

4

所有任务比local.phoenixphoenix.new其他运行它的输出,像只可从凤凰应用程序的diretory内phoenix.gen.html。如果您从应用程序目录内运行它,您应该在mix help中看到它们。

注意:如果您想在mix help中看到它出现在一个从未编译过的全新应用程序中,您必须使用mix compile编译应用程序一次。如果您直接运行其中一项任务,它将成功,因为mix将在尝试运行之前编译应用程序。

以外的任何应用程序的目录:

$ mix help | grep phoenix 
mix local.phoenix  # Updates Phoenix locally 
mix phoenix.new  # Creates a new Phoenix v1.2.1 application 

内的应用程序的目录(确保应用程序被运行mix compile先编译):

$ mix help | grep phoenix 
mix local.phoenix  # Updates Phoenix locally 
mix phoenix.digest  # Digests and compress static files 
mix phoenix.gen.channel # Generates a Phoenix channel 
mix phoenix.gen.html  # Generates controller, model and views for an HTML based resource 
mix phoenix.gen.json  # Generates a controller and model for a JSON based resource 
mix phoenix.gen.model # Generates an Ecto model 
mix phoenix.gen.presence # Generates a Presence tracker 
mix phoenix.gen.secret # Generates a secret 
mix phoenix.new   # Creates a new Phoenix v1.2.1 application 
mix phoenix.routes  # Prints all routes 
mix phoenix.server  # Starts applications and their servers 
+0

这是有道理的,这是正确的: – user7017138

+0

$混phoenix.new hello *创建hello/config/config.exs ... cd hello $ ls README.md \t \t brunch-config.js \t deps \t \t \t mix。EXS \t \t \t node_modules \t \t私法\t \t \t网络 _build \t \t \t配置\t \t \t LIB \t \t \t mix.lock \t \t的package.json \t \t测试 $混合-h | fgrep phoenix mix local.phoenix#本地更新Phoenix mix phoenix.new#创建新的Phoenix v1.2.1应用程序 – user7017138

+0

@ user7017138您必须先编译应用程序。请参阅我的编辑。 – Dogbert