GithubHelp home page GithubHelp logo

Comments (7)

gylaz avatar gylaz commented on August 10, 2024

You could add ./bin to your PATH. Here's how Tim Pope suggests doing it. Then for projects that have spring wrapped rspec in their bin/ directory, it will use that. Otherwise, it'll find the next available rspec in your PATH.

from vim-rspec.

thewatts avatar thewatts commented on August 10, 2024

@gylaz --- thanks for the quick response! I'll git it a shot!

from vim-rspec.

thewatts avatar thewatts commented on August 10, 2024

hey @gylaz, just used Tim Pope's suggestion - and pulled the code directly from #52, and while it works great in terminal, when I'm in vim and run the command - it's not picking up Spring.

My direct command in my vimrc now: let g:rspec_command = '!bundle exec rspec {spec}'

Am I missing something?

from vim-rspec.

jferris avatar jferris commented on August 10, 2024

If you have rspec on your PATH as a binstub, you want just rspec and not bundle exec rspec. Using bundle exec will force it to find the binary from the rspec-core gem and not from Spring.

from vim-rspec.

gylaz avatar gylaz commented on August 10, 2024

Going to close this. @thewatts feel free to re-open if you're still having issues.

from vim-rspec.

mecampbellsoup avatar mecampbellsoup commented on August 10, 2024

So to be clear, the "best of both worlds" @thewatts requested can be had by let g:rspec_command = 'rspec {spec}' and adding ./bin to one's PATH - correct?

from vim-rspec.

jondkinney avatar jondkinney commented on August 10, 2024

@mecampbellsoup from my testing just now, that is correct. Though I'm using RVM (I'm pretty sure @tpope is not), and I needed to do this to get my bin dir in the front of my path:

  1. brew install direnv

  2. Add eval $(direnv hook $0) to the end of my ~/.zshrc file

  3. Create a .envrc file in the root of my project with the following content:

    PATH_add bin

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.