Closed johnkferguson closed 10 years ago
I can't think of any reason either off the top of my head. Xray uses Open3 to open the file, so you could try this in IRB:
require 'open3'
Open3.capture3("/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl", "README.md")
Give that a go and let me know if it works.
Yea, the above command works. That's weird. It still doesn't open a view within Sublime when I click on it in the browser.
Still baffled by this. My gut feeling is that the space in the path isn't being stored in the YAML file correctly, but it seems fine from what you pasted.
Could you try using the cog icon in xray's UI to set the path and see if that makes a difference?
I have the same problem. Any idea?
Do you use tmux with OSX? I had same problem.
$ tmux new-window irb
require "open3"
Open3.capture3('/usr/local/bin/subl /etc/profile')
# Activate SublimeText. But does not open file
And fixed by using reattach-to-user-namespace
$ tmux new-window 'reattach-to-user-namespace irb'
require "open3"
Open3.capture3('/usr/local/bin/subl /etc/profile')
# Open file
Ah, I see. I personally do not use tmux, precisely because of the env issues like this it causes :)
Is there anything we can add to xray to workaround this?
If you use sublime simply create symlink
for subl
to usr/local/bin/
. As that is where xray search for subl https://github.com/brentd/xray-rails#configuration
sudo ln -s /usr/bin/subl /usr/local/bin/subl
Or, You can just create a ~/.xrayconfig
in root and add the following
:editor: '/usr/local/bin/subl'
I've been having trouble getting
xray-rails
to open files using Sublime Text 3.I have my
`~/.xrayconfig
file defined as follows:I'm not sure why it won't open files as I can open files with Sublime from the command line by running the following command:
'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' name_of_file
I'm pretty baffled on why it won't work with
xray-rails
. The only other piece of relevant information that I can think of is that I haveoh-my-zsh
installed on my machine.Any ideas on how to get this to work or what I could be doing wrong?
Thanks a lot.