ruby-on-rails - 如何在 WSL 环境中使用 better_errors 启动编辑器
问题描述
我better_errors
在 WSL 环境中使用 gem。
当我使用 Mac 时,我可以通过单击错误页面的文件路径来打开一个文件,如下所示。
我在config/environments/development.rb
.
BetterErrors.editor='x-mine://open?file=%{file}&line=%{line}' if defined?(BetterErrors)
链接 URL 似乎已正确创建。
x-mine://open?file=%2Fhome%2Fironsand%2Fdev%2Fmyapp%2Fapp%2Fcontrollers%2Fcompanies_controller.rb&line=12`
如何x-mine:
在 Windows 中打开以开头的 URL?
解决方案
从 Microsoft 文档本身,您必须破解系统注册表。
您需要进行如下设置:
HKEY_CLASSES_ROOT
x-mine
(Default) = "URL:RubyMine Protocol"
URL Protocol = ""
shell
open
command
(Default) = "C:\Program Files\IntelliJ\mine.exe" "%1"
(您可能需要更改路径以使其指向安装 RubyMine 的实际路径)。
推荐阅读
- javascript - 如何在最后一张幻灯片上停止我的 html 演示文稿?
- swift - Swift:如果这是在 VC 中制作嵌套 UIView 的好方法,需要指导
- c# - 检查用户是否已经登录统一
- javascript - JavaScript 函数的返回值错误
- macos - 如何从 SwiftUI 视图中运行 AppleScript?
- django - 如何在 django 模板中转换列表中的字段?
- android - 如何获取房间数据库大小
- excel - 如何将 Excel 事件处理程序应用于所有工作表?
- python - 访问数组列表的元素
- flutter - Flutter:在凸起按钮中带有参数的函数