Closed turtleWarrior88 closed 6 years ago
Sounds like something is wrong with the Ruby environment, can you try running each of these commands and tell me what happens?
$ seeing_is_believing -e '1+1'
$ seeing_is_believing -v
$ ruby -v
$ ruby -S seeing_is_believing -e '1+1'
$ gem list seeing_is
For comparison, this is what I see on my computer.
When you ran seeing_is_believing -e '1+1'
you say there was no output, did it execute and not print anything or did hang indefinitely?
When I ran seeing_is_believing -e '1+1'
(in cmd), It shows no output and remains active indefinetly, unless I press Ctrl + C , then It shows the folloving message:
C:/Ruby23/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/windows/lib.rb:385:in check_error': Access denied. (5) (ChildProcess::Error) from C:/Ruby23/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/windows/handle.rb:64:in send' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/childprocess-0.5.9/lib/childprocess/windows/process.rb:15:in stop' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/evaluate_by_moving_files.rb:154:in ensure in evaluate_file' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/evaluate_by_moving_files.rb:158:in evaluate_file' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/evaluate_by_moving_files.rb:52:in block in call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/hard_core_ensure.rb:32:in invoke_code' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/hard_core_ensure.rb:14:in call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/hard_core_ensure.rb:4:in call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/evaluate_by_moving_files.rb:47:in call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/evaluate_by_moving_files.rb:27:in call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing.rb:44:in block in call' from C:/Ruby23/lib/ruby/2.3.0/tmpdir.rb:89:in mktmpdir' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing.rb:38:in call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing.rb:27:in call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/binary/engine.rb:39:in evaluate!' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/lib/seeing_is_believing/binary.rb:40:in call' from C:/Ruby23/lib/ruby/gems/2.3.0/gems/seeing_is_believing-3.2.0/bin/seeing_is_believing:7:in <top (required)>' from C:/Ruby23/bin/seeing_is_believing:22:in load' from C:/Ruby23/bin/seeing_is_believing:22:in <main>'
The outputs of the other commands are the following:
seeing_is_believing -v
outputs 3.2.0ruby -v
outputs ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]ruby -S seeing_is_believing -e '1+1'
doesn't change the result, it keeps running with no outputgem list seeing_is
outputs seeing_is_believing (3.2.0)Hmm, I'm probably going to have to dl Windows 10 to try reproducing it >.< Not sure my internet is good enough to do that here, though.
Any progress ?
I got the same error* on win8.1
however, in my case seeing_is_believing -e '1+1'
gives 1+1 # => 2
as expected.
I managed to work around the problem by changing Settings -> Seeing is believing command
to seeing_is_believing.bat
(it was in the path, but I think node's spawn
method, unlike cmd.exe
does not try appending .exe
or .bat
to the end of filenames)
more information:
OS: Win 8.1 x64 Atom: 1.19.5 ia32 atom-sib: 2.2.3 Stack Trace:
Error: write EPIPE
at exports._errnoException (util.js:1022:11)
at Socket._writeGeneric (net.js:715:26)
at Socket._write (net.js:734:8)
at doWrite (_stream_writable.js:332:12)
at writeOrBuffer (_stream_writable.js:318:5)
at Socket.Writable.write (_stream_writable.js:245:11)
at Socket.write (net.js:661:40)
at Object.invokeSib (file:///C:/Users/Bor/.atom/packages/seeing-is-believing/lib/seeing-is-believing.coffee:93:15)
at Object.run (file:///C:/Users/Bor/.atom/packages/seeing-is-believing/lib/seeing-is-believing.coffee:71:6)
at HTMLElement.subscriptions.add.atom.commands.add.seeing-is-believing:annotate-document (file:///C:/Users/Bor/.atom/packages/seeing-is-believing/lib/seeing-is-believing.coffee:46:58)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\src\command-registry.js:265:35)
at C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\src\command-registry.js:3:65
at Object.didConfirmSelection (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\node_modules\command-palette\lib\command-palette-view.js:106:35)
at SelectListView.confirmSelection (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\node_modules\atom-select-list\src\select-list-view.js:313:26)
at HTMLDivElement.core:confirm (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\node_modules\atom-select-list\src\select-list-view.js:81:20)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\src\command-registry.js:265:35)
at C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\src\command-registry.js:3:65
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:610:22)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:401:28)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\src\window-event-handler.js:100:42)
at HTMLDocument.<anonymous> (C:\Users\Bor\AppData\Local\atom\app-1.19.5\resources\app\src\window-event-handler.js:3:65)
the output of mentioned commands:
* (not the exact same error, but atom displayed a popup saying error is already reported with a link to here)
while this workaround probably won't help solve the original issue (since that is related to seeing_is_believing
not giving an output, not the atom extension), but it should be fixed regardless.
my guess is that since windows does not support shebangs, Ruby's gem (similar to node's npm/Python's pip/...) creates a file called module.bat
with code to execute the original file. but child_proccess
's spawn tries to run the original file instead (which to windows is a text file and not an executable one).
Goodnight
I am currently working with the programming language ruby on rails, and I have installed a package in my text editor that is atom, what happens is that when I run the code the program gets me an error. The package with the I am working on this project is SeeingIsBelieving that I can do so that I do not leave more error
Attached screen of the error that is generated to me when compiling the code.
Hi, @cesar225, try gem pristine --all
FWIW, it seems like your issue is different than the ones above, so if that doesn't do it, I'll open a different issue for it.
Oh, and yeah, I'm back from Colombia, and have a better computer, so I can try downloading Windows and running it in a VM to see if I can reproduce it. Just gotta work up the motivation.
I reproduced the error @zumoshi and @cesar225 had. Appending .bat
worked for me. I'll look into whether that can be set by default for Windows. I'll leave this post open until I do.
Huge, shoutout to @zumoshi for figuring that out! My VM is unbearably slow right now, I don't think I would have gotten it >.<
For @turtleWarrior88 I think that in your first post, it lists SiB as 2.2.3, in the second one, it's 3.2.0, I assume that upgrade fixed the problem from the first post. Next thing I'm noticing is that your version of child_process
in the second one is 0.5.9, I think I had issues with that one, on one of these Ruby upgrades, and bumped the dependency to 0.7.1 for SiB 3.3, can you try installing that one with gem install seeing_is_believing -v 3.3.0
?
IDK what changes I was talking about, but this is released, so I'm going to close it now.
[Enter steps to reproduce:]
Atom: 1.15.0 ia32 Electron: 1.3.13 OS: Windows 10 Ruby Version Installed: 2.3.3p222 (uses neither rbenv nor rvm, since its Windows) Thrown From: seeing-is-believing package 2.2.3
Stack Trace
Uncaught Error: write EPIPE
Commands
Non-Core Packages