简体   繁体   English

Windows:Elixir phoenix MIX_ENV = prod:该术语无法识别

[英]Windows: Elixir phoenix MIX_ENV=prod : The term is not recognized

Just started to learn elixir and phoenix framework. 刚开始学习elixir和phoenix框架。 for the most part it going well. 在大多数情况下,它进展顺利。 However when I want to run ecto.create on my production configs, I get an error in my cmd & powershell that MIX_ENV=prod : The term is not recognized. 但是当我想在我的生产配置上运行ecto.create时,我的cmd和powershell中出现错误MIX_ENV = prod:该术语无法识别。 Just in general though MIX_ENV=Xyz doesn't work for me. 总的来说虽然MIX_ENV = Xyz对我不起作用。

I've made a fresh new phoenix project to see if it was a compile problem. 我做了一个全新的凤凰项目,看看它是否是编译问题。 wasn't that. 不是那样的。

Working on windows. 在窗户上工作。

MIX_ENV=prod : The term 'MIX_ENV=prod' is not recognized as the name of a cmdlet, function, script file, or operable program. MIX_ENV = prod:术语“MIX_ENV = prod”未被识别为cmdlet,函数,脚本文件或可操作程序的名称。 Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。 At line:1 char:1 + MIX_ENV=prod mix phoenix.server + ~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MIX_ENV=prod:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException 在行:1 char:1 + MIX_ENV = prod mix phoenix.server + ~~~~~~~~~~~~ + CategoryInfo:ObjectNotFound:(MIX_ENV = prod:String)[],CommandNotFoundException + FullyQualifiedErrorId:CommandNotFoundException

Any thoughts what would make a important function stop working? 什么会使一个重要的功能停止工作的任何想法?

phoenix,1.1.4 凤凰,1.1.4

Elixir 1.2.1 Elixir 1.2.1

Erlang/OTP 18 [erts-7.2.1] [64-bit] [smp:4:4] [async-threads:10] Erlang / OTP 18 [erts-7.2.1] [64位] [smp:4:4] [async-threads:10]

MIX_ENV is an environment variable and you just need to set it. MIX_ENV是一个环境变量,您只需要设置它。 Powershell does that differently than a *nix shell, so the examples that show putting MIX_ENV=prod in line with the mix command won't work. Powershell与* nix shell的MIX_ENV=prod不同,因此显示将MIX_ENV=prod与mix命令一致的示例将不起作用。

Use $env:MIX_ENV="prod" to set the environment variable and then call the rest of the mix command line. 使用$env:MIX_ENV="prod"设置环境变量,然后调用mix命令行的其余部分。

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

相关问题 无法将“ MIX_ENV”识别为内部或外部命令,可操作程序或批处理文件 - 'MIX_ENV' is not recognized as an internal or external command, operable program or batch file 如何设置 Windows shell 环境变量? 术语“C:\Users\stojko\”未被识别为 cmdlet 的名称 - How to set Windows shell env variable? The term 'C:\Users\stojko\' is not recognized as the name of a cmdlet 如何正确地将Elixir / Phoenix程序部署到Windows? - How to correctly deploy Elixir/Phoenix program to Windows? Python、Windows:术语“conda”未被识别为 cmdlet 的名称 - Python, Windows: The term 'conda' is not recognized as the name of a cmdlet pyenv windows 术语“pyenv”未被识别为 cmdlet 的名称,function - pyenv windows the term 'pyenv' is not recognized as the name of a cmdlet, function PowerShell 术语无法识别 - PowerShell term not recognized Windows 2008 R2 powershell术语“Get-Disk”无法识别为cmdlet的名称 - Windows 2008 R2 powershell The term 'Get-Disk' is not recognized as the name of a cmdlet 术语“cmake”未被识别为 cmdlet 的名称 - The term 'cmake' is not recognized as the name of a cmdlet Powershell Windows Server 2008 R2 SP1中未将术语“ Get-MsmqQueue”识别为cmdlet的名称 - Powershell The term 'Get-MsmqQueue' is not recognized as the name of a cmdlet in Windows Server 2008 R2 SP1 无法识别术语“节点”...在 Powershell 中 - The term 'node' is not recognized... In Powershell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM