Closed foreverqihe closed 4 years ago
Have you tried starting the REPL with M-x inf-ruby-console-auto
?
Hi @dgutov ,
Thank you for reply. Yes, I did. It blocked the whole emacs.
After I type M-x inf-ruby-console-auto, it starts the pry, and I just typed ENTER, the whole emacs is blocked. Not sure if it is my computer's issue. So I have to C-g and kill the buffer, then I turn to C-c C-s (Start REPL) and it starts irb, But it can't load my file in local gem: LoadError: cannot load such file -- foo/bar
Regards, He Qi
That is the problem you'll need to solve, then. inf-ruby-console-auto
is designed to create a REPL with your environment loaded.
As far as freezing goes, try M-x toggle-debug-on-quit
, then, when it freezes, press C-g
and see if the backtrace shows anything interesting.
Followed your instruction, I got this. But I am not familiar with elisp. Anything interesting for you?
Debugger entered--Lisp error: (quit)
accept-process-output(#
apply(#
Oh, that's weird. It freezes while processing that Enter
. Not sure I've seen that before.
What I can recommend, is edebug-ing comint-send-input
:
First, launch the REPL with inf-ruby-console-auto
, but don't press Enter
afterwards, yet.
M-x find-function RET comint-send-input RET
.M-x edebug-defun RET
(it should echo comint-send-input
).Then go back the REPL, press RET, and go though the function step-by-step, see if anything odd jumps out at you.
This is probably going to be a rabbit hole, though. The real answer might be along the lines of "recompile Ruby with readline support", or something similar.
Are you on MS-Windows? Maybe some other Windows users could help.
will give it a go and let you know the result.
@foreverqihe Let me know if there are any news.
Hi, I am using robe mode to write Rake scripts (ruby files) My Gemfile has a gem on local path, e.g.:
gem “foo”, :path => “/path/to/foo”
My issue is the robe-start or inf-ruby cannot load the file as lib/main.rb has:
require 'foo'
How to solve this issue so I can jump to definition without having to use IntelliJ/RubyMine?
Thank you in advance.
Regards, He Qi