Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIB is just emptying the current page. #23

Open
cocoonkid opened this issue Oct 18, 2018 · 4 comments
Open

SIB is just emptying the current page. #23

cocoonkid opened this issue Oct 18, 2018 · 4 comments

Comments

@cocoonkid
Copy link

This happens with the shortcut option + command + b or when calling it from the package manager.
Any idea what is causing this?

@cocoonkid
Copy link
Author

I switched from 2.5.1 to 2.4.4 and have the same behaviour. But in Atom it works now.

@JoshCheek
Copy link
Owner

My guess is that the Sublime implementation is very bare-bones, it probably has some sort of error (most likely that it can't find the executable, b/c of PATH issues) and so there is no output, and it updates your file to have no output. Kinda dumb, really. It should, at the very least, tell you what the error is. NOTE: you should be able to get your file contents back with undo (probably Command-z).

The Atom one works well because I do a much better job of maintaining it (it's the one I use most frequently) and Atom has an awesome feature where it will launch a login shell when it starts, and then pull the environment variables from there. This fixes the PATH issue, and has made it much much easier to maintain.

Oh, important debugging tip: you can get a Python console in ST, which probably shows the error, or will let you run the commands directly, allowing you to see the error. I haven't used ST in years, but I feel like the console was bound to Control-backtick (if that doesn't work, you'll have to look it up).


I'll leave this issue open in case I come back and want to improve it a bit, or if a user wants to contribute, then this will serve as a record / invitation. For the moment, though, it's not a priority for me.

@cocoonkid
Copy link
Author

Thank you very much for this precise answer. Much appreciated.
I can confirm 'undo' works.

@konung
Copy link

konung commented Oct 22, 2020

Hi. Having the same issue.

Sublime's Console was silent on the problem.

Dug in a little bit and here is what I found

  1. Added basic debugging output to the package
  2. Looks like the package is not finding ruby command
    ['ruby', '-S', 'seeing_is_believing', '--as', '/tmp/sib.rb']
    Instead of in my case asdf-ruby ( I use asdf, instead of rbenv or rvm)
    ['/Users/konung/.asdf/shims/ruby', '-S', 'seeing_is_believing', '--as', '/tmp/sib.rb']
  3. Packing is not picking up "global" setting for ruby_command, in main ST3 settings.
  4. As a result package is using "system ruby", which in my case doesn't have any of the required gems installed. And the plugin silently errors out

1 solutions.

  1. Overwrite local version of "Seeing Is Believing.sublime-settings" and "ruby_command" to your version of ruby"
    image
  2. Install necessary gems into system ruby ( a non-starter for me personally)
  3. Modify how Popen runs a subprocess (too much of a rabbit hole, given time constrains)
  4. Load, overrwite and merge settings from sublime.load_settings("Preferences.sublime-settings").get("ruby_command", True)?

For now I'm just going with option 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants