can not generate phoenix app

三世轮回 提交于 2019-12-11 10:11:50

问题


i want try Phoenix framework, but can not take it I install elixir brew install elixir, after it, i install Phoenix mix archive.install /path/to/archive and try mix phoenix.new new_app and get the error:

** (UndefinedFunctionError) undefined function:crypto.strong_rand_bytes/1 (module :crypto is not available) :crypto.strong_rand_bytes(64) lib/phoenix_new.ex:459: Mix.Tasks.Phoenix.New.random_string/1 lib/phoenix_new.ex:187: Mix.Tasks.Phoenix.New.run/4 (mix) lib/mix/cli.ex:55: Mix.CLI.run_task/2 (elixir) lib/code.ex:363: Code.require_file/2

Elixir -v 1.1.1

mix -v 1.1.1

erlang/OTP 18

OSX 10.11.1


回答1:


Try running this:

$ mix deps.get 
$ mix deps.compile  

It may be that the crypto module didn't get pulled down. Either way the output of those commands may help you to get a better idea of what the issue is.




回答2:


Erlang was installed with brew, but was unlinked.

brew link erlang solve my trouble



来源:https://stackoverflow.com/questions/34040778/can-not-generate-phoenix-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!