gpt4 book ai didi

sublimetext3 - Rails 5.2 无法使用 Sublime Text 打开 rails 凭据

转载 作者:行者123 更新时间:2023-12-03 23:29:49 25 4
gpt4 key购买 nike

我正在使用带有 Rails 5.2 和 Sublime Text 3 的适用于 Linux 的 Windows 子系统。
当我做

EDITOR="subl --wait"rails 凭证:编辑

它说“新凭据已加密并已保存”。但不打开要使用 Sublime Text 3 编辑的文件。
同样在尝试使用 Visual Studio Code 时

EDITOR="code --wait"rails 凭证:编辑

Visual Studio Code 打开但它是空的。

我只能用 VIM 和命令编辑文件
EDITOR="vim"rails 凭证:编辑

问题是我不想用 vim 编辑文件。
是什么问题导致无法打开要使用 Sublime 或 VS Code 编辑的文件?

我正在使用 Rails 5.2

非常感谢提前

enter image description here

最佳答案

我在 Windows 7x64 上,今天早上偶然发现了这个问题。通过将 atom 添加到我的系统变量 Path(所以 cmd & powershell & bash 都知道它)并将 powershell 添加到我的环境中解决了这个问题。我为 ruby​​ & 使用单独的环境导轨。

所以现在当我输入 set EDITOR=atom --wait && rails credentials:edit在 cmd 或

第一 $env:EDITOR="atom --wait" , 第二 rails credentials:edit在 powershell 或
EDITOR="atom --wait" rails credentials:edit在 bash 中,

我得到了想要的结果,即打开凭据并编辑它们:).. 希望这会有所帮助

附注。我不需要使用 --wait将编辑器设置为 subl 或记事本时的标志!EDITOR只是当前 session 的临时变量,意思是当前打开的 cmd、powershell 或 bash 窗口!

关于sublimetext3 - Rails 5.2 无法使用 Sublime Text 打开 rails 凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51031701/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com