1

I'm trying to find a way to run .rb files that are in the $PATH in Eshell by following the solution here. I added ".rb" to exec-suffixes, set eshell-force-execution to t and customized eshell-interpreter-alist like this:

Regexp: \.rb
String: c:/programs/rails/Ruby1.9.3/bin/ruby.exe

But when I run an .rb file in eshell I get an error: c:\programs\rails\Ruby1.9.3\bin\ruby.exe: No such file or directory -- bill.rb (LoadError)

However it works if I run the file in the directory where it is located or with a full path. Seems like it is necessary to make interpreter in eshell-interpreter-alist expand bill.rb to its full path somehow to make it work, but I couldn't find a way to do that.

Sum Proxy
  • 43
  • 6

1 Answers1

1

I had to change eshell-interpreter-alist to Regexp: \.rb Interpreter: eshell-run-ruby-command-from-path And provide the following function to make it work (defun eshell-run-ruby-command-from-path (args) (eshell-named-command "ruby.exe" (list (eshell-search-path args))))

Sum Proxy
  • 43
  • 6