I'm using better_errors
gem in WSL environments.
When I used Mac, I could open a file by clicking error page's file path like below.
I have this line in config/environments/development.rb
.
BetterErrors.editor='x-mine://open?file=%{file}&line=%{line}' if defined?(BetterErrors)
The link URL seems properly created.
x-mine://open?file=%2Fhome%2Fironsand%2Fdev%2Fmyapp%2Fapp%2Fcontrollers%2Fcompanies_controller.rb&line=12`
How can I open a URL start with x-mine:
in Windows?
From Microsoft documentation itself, you have to hack your way through the system registry.
You need to set it up like the following:
HKEY_CLASSES_ROOT
x-mine
(Default) = "URL:RubyMine Protocol"
URL Protocol = ""
shell
open
command
(Default) = "C:\Program Files\IntelliJ\mine.exe" "%1"
(you might have to change your path for it to point to the actual path of where you have installed RubyMine).
See https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)?redirectedfrom=MSDN for more details.