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
Typing doesn't appear in terminal after exiting guard #619
Comments
Could be some stdout/stderr leftovers - or an undead pry session/thread. |
Guard 2.7.0 was released - do you still have the problem? If so, what is the last line that's making the prompt invisible? |
Thanks, I'll upgrade and see what happens this week. |
Just upgraded and I'm still seeing this issue. I'm not sure what you mean though by your second question. Guard is idle after running the specs, and when I press |
Guard uses LumberJack and I think it's the LumberJack thread(s) which doesn't get cleaned up (so when guard exits, LumberJack dumps the remaining output messages in the "background" after you get the shell prompt so ... the shell prompt gets hidden. This will probably be fixed soon. |
Ah, okay. Thanks! |
in the meantime, have you tried typing (I found this issue because when I'm running guard with pry-byebug, I can see what I type in my guard repl, but when I add a binding.pry to a file, I can't see what I'm typing in the that repl. Weird |
@bf4 - might be an issue with buffering. You can try putting in your Guardfile: $stderr.sync = true
$stdout.sync = true and doing the same somewhere in your app (e.g. before That's just to see if doing so changes anything (synced output doesn't make sense to keep). It might be also an issue with readline and Pry, so you may want to uninstall both and install Pry (and readline) according to whatever is currently recommended in their docs. Or you might make sure you don't have a custom config somewhere. |
I fixed it by removing readline-rb gem and editing the .editrc per osx |
I'm closing this since it seems to be a readline issue, not a Guard issue. If there's anything I can do in Guard to prevent this (or fix this) - please reopen. |
I think it may have actually been an issue with |
@mockdeep - strange. But thanks for letting me know. If I ever reproduce it (I use Linux), I'll resolve this. |
I was getting it pretty consistently when |
Yeah, the cool Zeus output updating interferes with Pry. Workaround: guard 'zeus', cli: '> /dev/null' do The other workaround is of course to simply run Zeus in a separate terminal. |
I submitted an issue here: guard/guard-zeus#18 Needs changes in Zeus to support this though. |
Nice. I'll keep this in mind going forward if I run into any similar issues. For now we've switched to |
If you're using spring on Linux, you may want to subscribe to this issue: rails/spring-watcher-listen#1 (basically, once I get to it, spring will use inotify on Linux instead of polling). |
Nice! Followed. |
So, I see in the docs https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X the
It seems these docs talk to each other. May I add the editrc info or link to the pry docs? |
@bf4 -
Absolutely! It would be much appreciated! |
See guard/guard#619 (comment) Technically for OSX you don't need readline, and we'll focus on using libedit which OSX comes with instead. Edit the file .editrc in your home directory. Add this line: bind "^R" em-inc-search-prev You can now use ctrl+r to do a reverse history search. Ref: http://hints.macworld.com/article.php?story=20080313113705760 Alternatively, install GNU Readline and get Ruby to use it: https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X Finally, Pry does work with rb-readline, a pure Ruby implementation of Readline which shouldn't suffer from the platform and install dependencies of the standard Readline. Ref: https://github.com/luislavena/rb-readline
See guard/guard#619 (comment) Technically for OSX you don't need readline, and we'll focus on using libedit which OSX comes with instead. Edit the file .editrc in your home directory. Add this line: bind "^R" em-inc-search-prev You can now use ctrl+r to do a reverse history search. Ref: http://hints.macworld.com/article.php?story=20080313113705760 Alternatively, install GNU Readline and get Ruby to use it: https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X Finally, Pry does work with rb-readline, a pure Ruby implementation of Readline which shouldn't suffer from the platform and install dependencies of the standard Readline. Ref: https://github.com/luislavena/rb-readline
I have this problem too. Even after a fresh restart, I'm using spring+guard, when I put a binding.pry breakpoint in my code, I cannot see anything I type. I tried adding |
@rahilsondhi |
Thanks. I tried putting that in my terminal before starting guard - no On Tue, Apr 7, 2015 at 11:21 AM, Benjamin Fleischer <
|
I've been running into this strange behavior for a while. I'll exit guard with
ctrl+D
and when I get a bash prompt, nothing appears at the prompt when I type. I can type shell commands and they will execute, but no text appears as I type. The output from the commands typed does show up. UsingGNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)
.The text was updated successfully, but these errors were encountered: