Comments (10)
@arthurnn Do you face same issue?
from minitest-emacs.
hey, i am not actually using minitest-mode + rvm , so neve catch that issue.. anyways, i added rvm-activate-corresponding-ruby
to it, to use the current version of rvm if possible. this should do the trick.. lemme know
from minitest-emacs.
@arthurnn Thanks. Is the new release available under Melpa/Marmalade? I couldn't find the update
from minitest-emacs.
they should be in both...(Melpa/Marmalade)
from minitest-emacs.
@arthurnn I installed new version. But the problem persists
-*- mode: minitest-compilation; default-directory: "~/Projects/sources/codetriage/" -*-
started at Tue Dec 17 22:05:22
bundle exec rake
Your Ruby version is 2.1.0, but your Gemfile specified 2.0.0
exited abnormally with code 18 at Tue Dec 17 22:05:23
My default ruby version is 2.1.0 but .ruby-version specifies 2.0.0 But its not picked up.
from minitest-emacs.
I have the same problem, my output is:
*- mode: minitest-compilation; default-directory: "~/projects/crm/" -*-
started at Thu Aug 21 13:38:45
bundle exec ruby -Ilib\:test\:spec bundle exec ruby -Ilib\:test\:spec /Users/paulcowan/projects/crm/test/requests/emails/check_for_response_test.rb -ntest_creates_check_for_contact_response_tests_for_new_contact
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2
exited abnormally with code 18 at Thu Aug 21 13:38:46
I added the following to my ~/.emacs file:
(require 'minitest)
(add-hook 'ruby-mode-hook 'minitest-mode)
(add-hook 'ruby-mode-hook
(lambda () (rvm-activate-corresponding-ruby)))
But this did not cure the problem.
from minitest-emacs.
I will reopen this, as people seem to still have the issue.
from minitest-emacs.
I had this same problem with ruby-test-mode.el, but solved it by setting shell-file-name
to "/bin/bash" in an advised compilation function. I haven't verified this works with minitest-emacs, but it's worth a shot. Here's what you might add to your .emacs:
(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)
from minitest-emacs.
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 defadvice
macro which is apparently deprecated.
(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)
from minitest-emacs.
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
from minitest-emacs.
Related Issues (20)
- Consider add snippets? HOT 3
- Minitest snippet usage documentation?
- Please tag latest release for melpa stable HOT 4
- Switching from compilation mode to inf-ruby
- Documentation HOT 2
- Escape / HOT 1
- Colons and hash marks in test name not handled properly HOT 1
- Tests not detected when they're present inside context blocks HOT 1
- Support new Rails 5 syntax HOT 6
- Chruby support HOT 1
- Test file name regex HOT 2
- verify-single command doesn't work HOT 2
- Tests hang because external command thinks it's running in interactive terminal HOT 1
- verify single doesn't work with `it "tests things"` syntax HOT 1
- Option to use line number instead of regex HOT 7
- minitest-verify-single only works with rails HOT 1
- verify-single opens many new buffers when using line numbers
- verify single with anonymous tests HOT 3
- verify single with rails and docker seems broken
- Adding this package to non-gnu ELPA
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minitest-emacs.