GithubHelp home page GithubHelp logo

Comments (7)

shamanime avatar shamanime commented on August 10, 2024

I am experiencing the same issue, it happens when I try to set a custom rspec command on .vimrc.

from vim-rspec.

chalmagean avatar chalmagean commented on August 10, 2024

same here

from vim-rspec.

gylaz avatar gylaz commented on August 10, 2024

What is your g:rspec_command set to? If you are running from gui, then it should not contain the !.

from vim-rspec.

JamesLavin avatar JamesLavin commented on August 10, 2024

Thanks, @gylaz, for sharing your expertise!

I'm having the same problem. Spring works fine under ITerm but not under MacVim. Your comment got me one step closer. After I removed the "!", instead of throwing a E34 error, it's now opening a new Bash session in my root directory instead of the directory where I'm running Vim. Because of that, it can't find spring ("/Users/jlavin/.rvm/gems/ruby-1.9.3-p551/gems/spring-1.3.6/lib/spring/configuration.rb:46:in `find_project_root': Spring was unable to locate the root of your project. There was no Gemfile present in the current directory (/Users/jlavin) or any of the parent directories. (Spring::UnknownProject)").

Here's the relevant section of my .vimrc:

if has("gui_macvim")
  let g:rspec_command = "spring rspec {spec}"
else
  let g:rspec_runner = "os_x_iterm"
  let g:rspec_command = "!spring rspec {spec}"
endif

Thanks!

--James

from vim-rspec.

JamesLavin avatar JamesLavin commented on August 10, 2024

I fixed it. The following works for me under both ITerm and MacVim. I hope it works for others too:

if has("gui_macvim")
  let g:rspec_runner = "os_x_iterm"
  let g:rspec_command = "spring rspec {spec}"
else
  let g:rspec_runner = "os_x_iterm"
  let g:rspec_command = "!spring rspec {spec}"
endif

MacVim was defaulting to Terminal rather than ITerm.

Thanks again, @gylaz!

from vim-rspec.

shamanime avatar shamanime commented on August 10, 2024

Thank you @gylaz and @JamesLavin!

It was !'s fault. I totally missed it.

Much love guys!

from vim-rspec.

gylaz avatar gylaz commented on August 10, 2024

@JamesLavin Glad it worked out for you. You don't need to specify g:rspec_runner in the non-GUI case, since that variable is only used for GUI vim.

from vim-rspec.

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.