title: Rails 3 - Whenever gem error: /usr/bin/env: ruby: No such file or directory
body: <p>When using the 'whenever gem', I get an error in the log:</p>
  
  <pre><code>/usr/bin/env: ruby: No such file or directory
  </code></pre>
  
  <p>It works when I run the job manually. I've installed everything with RVM.</p>
  
  <p>I've used the <code>which</code> command to find where my Ruby installation is, and I get:</p>
  
  <pre><code>kevin@lovely:/opt/personal$ which ruby
  /home/kevin/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
  </code></pre>
  
  <p>and I've checked my $PATH variable, where it returns:</p>
  
  <pre><code>kevin@lovely:/opt/personal$ echo $PATH
  /home/kevin/.rvm/gems/ruby-1.9.2-p290/bin:/home/kevin/.rvm/gems/ruby-1.9.2-p290@global/bin:/home/kevin/.rvm/rubies/ruby-1.9.2-p290/bin:/home/kevin/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  </code></pre>
  
  <p>I believe this should be set up right, but I'm probably wrong since it doesn't work.  Can anyone point me in the right direction?</p>
  
  <p>If you're interested, this is what my whenever crontab output is:</p>
  
  <pre><code># Begin Whenever generated tasks for: rss
  0,5,10,15,20,25,30,35,40,45,50,55 * * * * /bin/bash -l -c 'cd /opt/personal &amp;&amp; script/rails runner -e development '\''FeedEntry.update_from_feed("http://lovely/blog/feed/")'\'' &gt;&gt; /opt/personal/log/feedzirra.log 2&gt;&amp;1'
  </code></pre>