0
votes

Whenever I try to run inf-ruby in emacs, it fails to load and I get the message "Wrong type argument: stringp, nil" in the echo area.

I have no idea how to go about debugging this, so the only solution I've tried is to restart the computer (which didn't work).

Could anyone offer advice on what is going wrong here/how to debug the error?

Edit: after enabling (setq debug-on-error t) and re-running inf-ruby, I got the following backtrace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  expand-file-name(nil)
  byte-code("\305\306 \307\"! \n\310 \211 \2052 \f@ \311
!\203* r
q\210\305 ! \230\203) \312\303
\"\210)\fA\211 \204  \310+\207" [default-directory current-dir inf-ruby-buffers buffer --dolist-tail-- expand-file-name locate-dominating-file inf-ruby-console-match nil buffer-live-p throw] 5)
  inf-ruby-buffer()
  run-ruby("irb --prompt default --noreadline -r irb/completion" "ruby")
  inf-ruby("ruby")
  call-interactively(inf-ruby record nil)
  command-execute(inf-ruby record)
  helm-M-x(nil #("inf-ruby" 0 8 (match-part "inf-ruby")))
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)
1
You should enable (setq debug-on-error t) and post the backtrace - Jürgen Hötzel
Ok, I've updated the question with the resulting debug report. - achalk

1 Answers

2
votes

Seems you started inf-ruby outside of an existing ruby-project (Gemfile). Recent versions of inf-ruby have a check for this condition:

https://github.com/nonsequitur/inf-ruby/commit/ec70d7f0e9d8d693d48e0cabfe55187e7b04e5f8

Upgrading your inf-ruby package should fix this issue.