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

inf-ruby buffer doesn't get response #51

Closed
stardiviner opened this issue May 22, 2014 · 22 comments
Closed

inf-ruby buffer doesn't get response #51

stardiviner opened this issue May 22, 2014 · 22 comments

Comments

@stardiviner
Copy link

When I open inf-ruby buffer and switch to it with [C-c C-s].
input puts "hi".
The process doesn't give response with anything.

Is there a way to debug this?

I tried with emacs -Q and emacs -q.
And load inf-ruby.
repeat upper same steps, still no response.

@dgutov
Copy link
Collaborator

dgutov commented May 22, 2014

Works for me. Are you using the plain irb as interpreter?

Maybe try removing everything from your .irbrc, or edebug through ruby-send-definition.

@stardiviner
Copy link
Author

@dgutov I checked out Emacs debug manual, https://www.gnu.org/software/emacs/manual/html_node/eintr/Debugging.html#Debugging

I tried some of them, (because I can't understand all of them)
like debug-on-quit, edebug-defun, eval and to next stop. etc.

So can you show more details about how to debug my issue?

@dgutov
Copy link
Collaborator

dgutov commented May 22, 2014

So can you show more details about how to debug my issue?

Not much. I don't have any specific ideas about what might be going wrong on your system. So you can try to walk through the execution of ruby-send-definition and understand what's going on (jump into ruby-send-region, and so on).

Note that you still haven't responded to the rest of my previous message.

@stardiviner
Copy link
Author

I have not set .irbrc file.

@stardiviner
Copy link
Author

And what is plain irb ? (with out custom configuration on irb?). Yes. I have not set any special on irb.

@dgutov
Copy link
Collaborator

dgutov commented May 22, 2014

Okay. What's your OS and version of Emacs?

@stardiviner
Copy link
Author

Ubuntu 14.04 (x86_64), Emacs version: 24.3.50.1

@MgaMPKAy
Copy link

I came across a similar problem. Now, I start irb with --inf-ruby-mode.

@dgutov
Copy link
Collaborator

dgutov commented Jun 23, 2014

@MgaMPKAy Interesting. What's your Ruby version?

@MgaMPKAy
Copy link

$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

$ irb -v
irb 0.9.6(09/06/30)

Actually, I add IRB.conf[:PROMPT_MODE] = :INF_RUBY to ~/.irbrc.

@stardiviner
Copy link
Author

Right, append option --inf-ruby-mode solved my issue.

@stardiviner
Copy link
Author

@MgaMPKAy thanks

@dgutov
Copy link
Collaborator

dgutov commented Jun 25, 2014

@stardiviner @MgaMPKAy How do your prompts look, without that option?

Does --noreadline help, instead?

Continuation prompts, which --inf-ruby-mode disables, look quite useful to me.

@stardiviner
Copy link
Author

Yes, --noreadline helps, without --inf-ruby-mode.

@dgutov
Copy link
Collaborator

dgutov commented Jun 26, 2014

Great. I see no reasons not to include this flag, then.

@dgutov dgutov closed this as completed in 6c85470 Jun 26, 2014
@stardiviner
Copy link
Author

@dgutov I got this problem again on console-rails.
When I run command inf-ruby-console-auto, and it raise up the prompt head :001>. But it suspended when I execute statement puts "hi".
I have tested without my init files. with emacs -q and load inf-ruby with (load "~/.emacs.d/el-get/inf-ruby/inf-ruby.el").
My Emacs version: 24.3.50.1
System: Ubuntu Linux x86_64
Rails version: 4.1.4
Use RVM.

@dgutov
Copy link
Collaborator

dgutov commented Jul 24, 2014

Have you tried putting

IRB.conf[:USE_READLINE] = nil

into your ~/.irbrc?

@stardiviner
Copy link
Author

@dgutov Thanks, it's solved.
And it's false, not nil.
I think this should be put in README as FAQ.

@dgutov
Copy link
Collaborator

dgutov commented Jul 25, 2014

Doesn't it work with nil? That's the value the doc suggests: http://www.ruby-doc.org/stdlib-2.0/libdoc/irb/rdoc/IRB.html#module-IRB-label-Configuration

I think this should be put in README as FAQ.

Ok, I will. Of course, if someone would actually find out the cause of the problem you're having, they might offer a better solution.

@stardiviner
Copy link
Author

@dgutov No, not work with nil. I have tested.

@dgutov
Copy link
Collaborator

dgutov commented Jul 25, 2014

I see.

I think this should be put in README as FAQ.

Not as FAQ, but it's in the README now.

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