Giter Club home page Giter Club logo

Comments (10)

prathamesh-sonpatki avatar prathamesh-sonpatki commented on August 23, 2024

@arthurnn Do you face same issue?

from minitest-emacs.

arthurnn avatar arthurnn commented on August 23, 2024

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.

prathamesh-sonpatki avatar prathamesh-sonpatki commented on August 23, 2024

@arthurnn Thanks. Is the new release available under Melpa/Marmalade? I couldn't find the update

from minitest-emacs.

arthurnn avatar arthurnn commented on August 23, 2024

they should be in both...(Melpa/Marmalade)

from minitest-emacs.

prathamesh-sonpatki avatar prathamesh-sonpatki commented on August 23, 2024

@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.

dagda1 avatar dagda1 commented on August 23, 2024

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.

arthurnn avatar arthurnn commented on August 23, 2024

I will reopen this, as people seem to still have the issue.

from minitest-emacs.

dylan-conlin avatar dylan-conlin commented on August 23, 2024

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.

cowboyd avatar cowboyd commented on August 23, 2024

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.

arthurnn avatar arthurnn commented on August 23, 2024

We have something to activate RVM before running the command

(if (fboundp 'rvm-activate-corresponding-ruby)
(rvm-activate-corresponding-ruby))
, that should fix the rvm case, not the rbenv tho. Can anyone running RVM confirm that for me?
@cowboyd if you wanna send a patch to make this rbenv compatible would be nice.

thanks all

from minitest-emacs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.