title: Capistrano + RVM + Rake task
body: <p>I have a project which </p>
  
  <ol>
  <li>uses rvm ruby 1.9.2 (set in .rvmrc in project dir).</li>
  <li>deploying with capistrano.</li>
  <li>has a rake task I want to run remotely from my local machine by capistrano.</li>
  </ol>
  
  <p>I've created a .sh file to run my task:</p>
  
  <pre><code>cd /var/www/pluslook/current
  /home/kirill/.rvm/scripts/rvm use 1.9.2@pluslook
  /home/kirill/.rvm/gems/ruby-1.9.2-p180@pluslook/bin/rake parse:feed RAILS_ENV="production" --trace
  </code></pre>
  
  <p>But when I'm trying to run this task i have an error:</p>
  
  <pre><code>Using /home/kirill/.rvm/gems/ruby-1.9.2-p180 with gemset pluslook
  Could not find linecache19-0.5.12 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  
  <p>I've installed all my gems in project's current directory so it looks like rake task is running from another directory. When I'm trying to run task from capistrano, It shows me the same error.</p>
  
  <p>Thank you and sorry for my English:)</p>