简体   繁体   English

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

[英]What are the steps to successfully run Ranch on windows?

Please what steps do we need to take to get Ranch working successfully on windows? 请问我们需要采取哪些步骤才能让Ranch在Windows上成功运行?

There is a very instructive set of examples in a great blog series which i am trying to follow here: 我想在一个很棒的博客系列中有一组很有启发性的例子:

http://dbeck.github.io/Using-Ranch-From-Elixir/ http://dbeck.github.io/Using-Ranch-From-Elixir/

http://dbeck.github.io/simple-TCP-message-performance-in-Elixir/ http://dbeck.github.io/simple-TCP-message-performance-in-Elixir/

It however requires that we use the Ranch Erlang Lib. 然而,它要求我们使用Ranch Erlang Lib。

Getting this to work on windows has been a pain so far: 到目前为止,让它在Windows上工作一直很痛苦:

mix.deps.compile fails 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

With some help from here: 在这里得到一些帮助:

https://github.com/ninenines/erlang.mk/issues/294#issuecomment-147379818 https://github.com/ninenines/erlang.mk/issues/294#issuecomment-147379818

I was able to get Ranch working on windows. 我能够让牧场在窗户上工作。

1) install the msys2 environment 1)安装msys2环境

2) run mix from within the MSYS2 environment 2)从MSYS2环境中运行mix

EDIT: Doing this via rebar 编辑:通过螺纹钢做到这一点

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>

Looking at Hex.pm, I decided to install rebar3 , this works/integrates well with mix. 看看Hex.pm,我决定安装rebar3 ,这可以很好地与mix混合使用。

following http://theburningmonk.com/2014/08/getting-started-with-rebar-on-windows/ we can get rebar3 working on windows 关注http://theburningmonk.com/2014/08/getting-started-with-rebar-on-windows/我们可以让rebar3在windows上工作

but this still does not work: 但这仍然不起作用:

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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows计划任务无法在启动时成功运行 - windows schedule task could not successfully run at startup Windows如何执行exe? 具体步骤是什么? - How exe is executed by Windows? What are the exact steps? 在docker上运行jenkins(在Windows上)…运行管道作业的正确步骤 - Running jenkins on docker (on Windows)… Proper steps to run pipeline job 在Pylons上为Cookiecutter设置虚拟环境的等效Windows步骤是什么? - What are the equivalent windows steps to setting up a virtual environment for Cookiecutters on Pylons? 在Windows上将Octave编译为共享库以便在开发中使用时,需要执行哪些步骤? - What are steps required to compile Octave on Windows as shared lib for use in development? 从Windows连接到Linux上的mysql数据库的步骤是什么 - What are the steps to be able to connect to a mysql database on linux from windows 使用 Windows 代理将更改从 teamcity 推送到 git 的步骤是什么 - what are the steps to push changes to git from teamcity using windows agent 从用C#编写仅Windows程序而来,为Linux和Windows开发有哪些步骤? - Coming from making Windows-only programs in C#, what steps are there for developing for Linux AND Windows? 用户登录Windows时需要运行我的exe,请告诉我有关此操作的步骤 - I need to run my exe when user logs into windows, please tell me steps for this Matlab, Windows compatible Docker Container Fails to run Matlab job steps of Azure Devops CI/CD job - Matlab, Windows compatible Docker Container Fails to run Matlab job steps of Azure Devops CI/CD job
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM