在windows上成功运行Ranch的步骤是什么?

在windows上成功运行Ranch的步骤是什么?,windows,erlang,elixir,elixir-mix,ranch,Windows,Erlang,Elixir,Elixir Mix,Ranch,请询问我们需要采取什么步骤才能使Ranch在windows上成功运行 在一个伟大的博客系列中有一组非常有启发性的例子,我在这里尝试如下: 然而,它要求我们使用Ranch Erlang库 到目前为止,让它在windows上工作一直是一件痛苦的事情: mix.deps.compile失败 C:\Elixir\tcp_eval>mix deps.update --all Running dependency resolution Dependency resolution completed

请询问我们需要采取什么步骤才能使Ranch在windows上成功运行

在一个伟大的博客系列中有一组非常有启发性的例子,我在这里尝试如下:

然而,它要求我们使用Ranch Erlang库

到目前为止,让它在windows上工作一直是一件痛苦的事情:

mix.deps.compile失败

C:\Elixir\tcp_eval>mix deps.update --all
Running dependency resolution
Dependency resolution completed successfully
  ranch: v1.1.0

C:\Elixir\tcp_eval>mix deps.compile
==> ranch
Access denied - SRC
File not found - -TYPE
File not found - F
File not found - -NAME
Access denied - SRC
File not found - -TYPE
File not found - F
File not found - -NAME
Access denied - SRC
File not found - -TYPE
File not found - F
File not found - -NAME
Access denied - SRC
File not found - -TYPE
File not found - F
File not found - -NAME
File not found - SRC/
File not found - -TYPE
File not found - F
File not found - -NAME
Access denied - EBIN
File not found - -TYPE
File not found - F
File not found - -NAME
 APP    ranch.app.src

在这里提供一些帮助:

我能让Ranch在windows上工作

1) 安装msys2环境

2) 在MSYS2环境中运行mix

编辑:通过钢筋执行此操作

D:\Elixir\tcp_eval>rebar
'rebar' is not recognized as an internal or external command,
operable program or batch file.

D:\Elixir\tcp_eval>rebar3
Rebar3 is a tool for working with Erlang projects.


Usage: rebar [-h] [-v] [<task>]

  -h, --help     Print this help.
  -v, --version  Show version information.
  <task>         Task to run.


Several tasks are available:

as                Higher order provider for running multiple tasks in a sequence as a certain profiles.
clean             Remove compiled beam files from apps.
compile           Compile apps .app.src and .erl files.
cover             Perform coverage analysis.
ct                Run Common Tests.
deps              List dependencies
dialyzer          Run the Dialyzer analyzer on the project.
do                Higher order provider for running multiple tasks in a sequence.
edoc              Generate documentation using edoc.
escriptize        Generate escript archive.
eunit             Run EUnit Tests.
help              Display a list of tasks or help for a given task or subtask.
new               Create new project from templates.
path              Print paths to build dirs in current profile.
pkgs              List available packages.
release           Build release of project.
relup             Create relup of releases.
report            Provide a crash report to be sent to the rebar3 issues page.
shell             Run shell with project apps and deps in path.
tar               Tar archive of release built of project.
tree              Print dependency tree.
unlock            Unlock dependencies.
update            Update package index.
upgrade           Upgrade dependencies.
version           Print version for rebar and current Erlang.
xref              Run cross reference analysis.

plugins <task>:
  list           List local and global plugins for this project
  upgrade        Upgrade plugins

unstable <task>:
  install        Extract libs from rebar3 escript along with a run script.
  upgrade        Download latest rebar3 escript and extract.

Run 'rebar3 help <TASK>' for details.

D:\Elixir\tcp_eval>

它看起来像Ranch的makefile运行的是
find
,希望它是Unix版本,但它得到的是Windows版本,实际上更像
grep
。我将在msys64环境中重试,请看您编辑的同行stritzinger。如果我们可以让Ranch在windows上运行,那么我们可以应用与其他使用erlang.mk的erlang lib相同或类似的方法。所以从某种意义上说,这也是一篇与erlang相关的文章。你应该能够在不使用Msys的情况下让它正常工作。您是否安装了钢筋?@OnorioCatenacci请参见:
D:\Elixir\tcp\u eval>mix deps.compile==>ranch'make'未被识别为内部或外部命令、可操作程序或批处理文件。==>tcp_eval**(Mix)无法编译依赖项:ranch,“make”命令失败。
@Onriocatenacci即使在安装了钢筋之后,Windows上仍然没有默认的“make”,Windows上也不会有默认的“make”。您需要安装gnu make或Visual Studio make(如果内存可用,实际上称为nmake)或其他东西。另外,还需要将其添加到路径中。在命令提示符下键入“钢筋”(减去双引号)。把你得到的作为你问题的编辑。钢筋需要在您的路径,它需要正确的工作,使牧场去。
D:\Elixir\tcp_eval>mix deps.compile
==> ranch
'make' is not recognized as an internal or external command,
operable program or batch file.
==> tcp_eval
** (Mix) Could not compile dependency :ranch, "make" command failed. You can recompile this dependency with "mix deps.compile ranch",

D:\Elixir\tcp_eval>