Using RVM gemsets inside of Vim <p>I have set up a <code>.rvmrc</code> file for my project, which simply looks like this</p> <pre><code>rvm use 1.9.3@myproj </code></pre> <p>My Vim workflow is to <code>:cd</code> into the project's directory and then use CommandT to navigate between files and execute specs via <code>:!bundle exec rspec %</code>.</p> <p>The problem is, that when I add something to my Gemfile and run <code>bundle install</code> from terminal and then go back to MacVim, it tells me to run <code>bundle install</code> again.</p> <p>When I do <code>:!rvm gemset gemdir</code>, it shows me that it's not using the desired gemset, meaning it returns only </p> <pre><code>/Users/darth/.rvm/gems/ruby-1.9.3-p0 </code></pre> <p>instead of </p> <pre><code>/Users/darth/.rvm/gems/ruby-1.9.3-p0@myproj </code></pre> <p>I tried doing <code>:!rvm gemset use myproj</code> but it doesn't seem to work.</p> <pre><code>:!rvm gemset use myproj /Users/darth/.rvm/bin/rvm: line 44: typeset: -g: invalid option typeset: usage: typeset [-afFirtx] [-p] name[=value] ... RVM is not a function, selecting rubies with 'rvm use ...' will not work. Using /Users/darth/.rvm/gems/ruby-1.9.3-p0 with gemset myproj </code></pre> <p>because if I do <code>:!rvm gemset gemdir</code> right after that, it still returns the default path, not the <code>@myproj</code> gemset.</p> <p>I'm using MacVim on OS X Lion, but I'm having the same problem in terminal Vim too.</p>