2015-10-12 36 views
3

請問我們需要採取哪些步驟才能讓牧場在Windows上成功運行?在Windows上成功運行牧場的步驟是什麼?

有一個非常有益的一套在一個偉大的博客系列的例子,我想在這裏跟隨:

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

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

但是,由於它需要我們用牧場的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 
+2

它看起來像的makefile牧場運行'find'並希望它是Unix版本,但是它取得了Windows版本,實際上它更像'grep'。 – legoscia

+0

我會在msys64環境中再次嘗試 –

+0

@ | peer-stritzinger見過你編輯。如果我們可以讓Ranch在Windows上運行,那麼我們可以將相同或類似的應用於其他使用erlang.mk的erlang庫。所以從某種意義上說,這也是一個與erlang相關的帖子。 –

回答

2

從這裏一些幫助:

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

我能夠讓牧場工作在Windows上。

1)從MSYS2環境中安裝運行混合的msys2環境

2)

編輯:通過螺紋鋼

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> 

這樣做縱觀Hex.pm,我決定安裝rebar3,這個工程/整合得很好與混合。

以下http://theburningmonk.com/2014/08/getting-started-with-rebar-on-windows/我們可以得到rebar3在Windows

工作,但這仍然不能正常工作:

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> 
+1

你應該能夠在不使用Msys的情況下工作。你有安裝螺紋鋼嗎? –

+0

@OnorioCatenacci看到這一點: 'd:\藥劑\ tcp_eval>混合deps.compile ==>牧場 「使」不被識別爲內部或外部的命令, 運行的程序或批處理文件。 ==> tcp_eval **(混合)無法編譯依賴關係:ranch,「make」命令失敗。「 –

+0

@OnorioCatenacci即使在安裝螺紋鋼之後,窗口上仍然沒有默認的」make「 –

相關問題