Open davidw opened 5 years ago
I think this is because the compilation mode runs in a non-login shell so the rvm hooks etc. don't load. I'm not sure if there's a way to have it run as a login shell, but I was able to get around this by manually loading the profiles script (see below: without the source ..
part it gave the wrong ruby binaries, but with it included it gave the right ones).
(defun rvm-load-example()
(interactive)
(compilation-start "source /etc/profile.d/rvm.sh && cd [project path] && which ruby")
)
You might be able to get it working by adding something like (concat "source /etc/profile.d/rvm.sh && " ...
in the rubocop-build-command
function, but I'm not exactly sure how to make this also work for non-rvm users.
That is from an emacs I had running.
If I start an Emacs in the project directory, and run things, it all seems to work well.