Tslime and Rspec Vim - not sending full path of spec


When running Tslime and Rspec vim its just running as rspec spec_name_spec.rb rather than the full path to the file, consequently, i get a cannot load file error. Is there something in addition to the steps in this blog post : http://robots.thoughtbot.com/running-specs-from-vim-sent-to-tmux-via-tslime I need to do to enable Rspec vim to send the full path?

For what its worth, i’m using iterm 2 along with Tmuxinator and am more than happy to load up my vimrc

@Tom_Ridge, can you paste your .vimrc config in a Gist?

The two major candidates I have right now are your g:rspec_command and g:rspec_runner configs or Vim/tmux having the wrong working directory.

@geoffharcourt thanks for the response, you can view my vimrc here:

Does this work when you use the non-forked version of tslime?

@geoffharcourt no unfortunately. Still get the same issue.

You’re gonna hate this, but I debugged a weird problem where vim-projectionist was destroying vim-rails mappings last week by disabling every plugin in my vimrc and then re-enabling them one by one.

Start by blowing away everything in your vimrc (just comment it all out), and then first get tslime working. Then start re-enabling items elsewhere one by one.

This won’t take forever, and it’s the most “scientific” way of determining what’s going on.

@geoffharcourt no worries, just happy to try out something to debug the issue. Sounds like a plan either way, will update you and let you know how I go.

@geoffharcourt so good news, wasn’t any of my plugins. Was the set autochdir line in my vimrc which set the working directory to my current file, which of course screwed with the output.

Still learning how to setup my vimrc properly, but glad to have sorted this one out.

1 Like

As someone who has done things like this more times than I care to remember, if you have your dotfiles checked in to version control, you can make VERY small commits, then leave the files just on your machine for a week or so to make sure there’s no adverse effects. After my files have lived locally and not screwed anything up, then you can squash (or not) and push to Github.

Glad you figured it out!