You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError on every save: settings file name uses __name__ (ST3/4) #4
The package's default setting is never loaded on Sublime Text 3/4, so saving any .rb file raises a TypeError.
Sublime Text build 4215, Windows. The package is not in Package Control's Install Package list here, so I copied the files from the repo master into Packages. I opened a .rb file, changed it and saved. The console showed:
RubyCheckOnSave.py, line 15, in run
child_process = subprocess.Popen(args, ...)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Cause: sublime.load_settings(__name__ + '.sublime-settings'). On ST3/4 __name__ is RubyCheckOnSave.RubyCheckOnSave, so it looks for RubyCheckOnSave.RubyCheckOnSave.sublime-settings, which does not exist. ruby is then None and Popen gets [None, "-cw", path].
Fix (tested): sublime.load_settings('RubyCheckOnSave.sublime-settings'). After this change the setting is read and the next save fails only because /usr/bin/ruby does not exist (see the next issue).
Activity