-
Notifications
You must be signed in to change notification settings - Fork 26
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
Doesn't use correct ruby with rvm #3
Comments
@arthurnn Do you face same issue? |
hey, i am not actually using minitest-mode + rvm , so neve catch that issue.. anyways, i added |
@arthurnn Thanks. Is the new release available under Melpa/Marmalade? I couldn't find the update |
they should be in both...(Melpa/Marmalade) |
@arthurnn I installed new version. But the problem persists
My default ruby version is 2.1.0 but .ruby-version specifies 2.0.0 But its not picked up. |
I have the same problem, my output is:
I added the following to my ~/.emacs file:
But this did not cure the problem. |
I will reopen this, as people seem to still have the issue. |
I had this same problem with ruby-test-mode.el, but solved it by setting (defadvice minitest--run-command (around minitest--run-command-around)
"Use BASH shell for running the specs because of ZSH issues."
(let ((shell-file-name "/bin/bash"))
(if (fboundp 'rvm-activate-corresponding-ruby)
(rvm-activate-corresponding-ruby))
ad-do-it))
(ad-activate 'minitest--run-command) |
For anybody coming across this using rbenv, I was able to find a solution that worked based on @dylan-conlin's solution, but using rbenv and not the (defun cowboyd-minitest-setup-env (do-run &rest arguments)
"Use Bash for minitest to avoid Zsh issues. Also, activate rbenv ruby if
necessary"
(let ((shell-file-name "/bin/bash"))
(rbenv-use-corresponding)
(apply do-run arguments)))
(advice-add 'minitest--run-command :around #'cowboyd-minitest-setup-env) |
We have something to activate RVM before running the command Lines 79 to 80 in ffc1b7e
@cowboyd if you wanna send a patch to make this rbenv compatible would be nice. thanks all |
When i try to run tests, it uses my default ruby but not the version mentioned in current project's
.ruby-version
file.Maybe if we change directory to
project-root
before running minitest command we can solve this problem.Right now it works as
bundle exec <command>
How can we change it to
cd <project_root> && bundle exex <command>
The text was updated successfully, but these errors were encountered: