[英]Leiningen only runs in one directory
I'm currently attempting to work through "Clojure for the Brave and True" ( in particular, trying to set it up ) and I'm running into some trouble.我目前正在尝试通过“Clojure for the Brave and True”(特别是尝试设置它)并且遇到了一些麻烦。 I'm on Windows 10 so I installed Leiningen according to the instructions on the website , but the lein commands only work on the Desktop where I installed it, not in the actual project folder which is located on the desktop (navigating to the actual folder does not let me run it; using lein run
on the Desktop simply results in the error "No:main namespace specified in project.clj."我在 Windows 10 上,所以我根据网站上的说明安装了 Leiningen,但是 lein 命令只能在我安装它的桌面上工作,而不是在桌面上的实际项目文件夹中(导航到实际文件夹不允许我运行它;在桌面上使用lein run
只会导致错误“No:main namespace specified in project.clj”。
Have I done something wrong in installing leiningen?我在安装 leiningen 时做错了吗?
You will need to edit your Path
environment variable to add the folder where you installed the lein.bat
file, or you could just provide the full path to that file instead of just lein
when you're working in a different folder.您将需要编辑您的Path
环境变量以添加安装lein.bat
文件的文件夹,或者当您在不同的文件夹中工作时,您可以只提供该文件的完整路径而不是仅提供lein
。
I would recommend creating a folder on your C:
drive to put lein.bat
in, and adding that folder to Path
instead of desktop.我建议在您的C:
将lein.bat
放入驱动器,然后将该文件夹添加到Path
而不是桌面。 I typically used to have C:\lein\
with lein.bat
in that folder.我通常在该文件夹中有C:\lein\
和lein.bat
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.