title: running a rake file via a bash script fired by a crontab
body: <p>I am trying to run a RAKE file from a bash script fired by a crontab:</p>
  
  <p>my crontab looks like this:</p>
  
  <pre><code>* * * * * /bin/bash ~/sites/www/tweeet/get_tweeet.sh
  </code></pre>
  
  <p>my bash script (get_tweeet.sh)  looks like this:</p>
  
  <pre><code>  1 #!/bin/bash
    2 set -x
    3 cd /var/www/tweeet/
    4 export RAILS_ENV=development
    5 rake get_tweeet &gt;&gt; /var/www/tweeet/test.log
    6 echo "$(date): cron job run    " &gt;&gt; /var/www/tweeet/test.log
  </code></pre>
  
  <p>What happens is that line 6 outputs into the test.log but line 5 does now - the rake does not run. </p>
  
  <p>BUT if i call the script using the exact line from the crontab</p>
  
  <pre><code>/bin/bash /var/www/tweeet/get_tweeet.sh
  </code></pre>
  
  <p>then it works - i'm baffled by this!</p>