title: Cron won't execute ruby script
body: <p>I have a cron job set to execute a shell script telling the server to run a single ruby command (<code>jekyll build --source /path/to/source/dir --destination /path/to/dest/dir</code>) 2 minutes past every hour. The script executes just fine when I run it via the terminal, but cron doesn't seem to fire it. I know cron's environment isn't the same as the user's and I've set its source path to my <code>.bash_profile</code>, where the user ruby environment is defined, as per advice elsewhere. I'm rather at a loss now.</p>
  
  <p>The crontab entry looks like this:</p>
  
  <p><code>2 * * * * . $HOME/.bash_profile ~/jek.sh</code></p>
  
  <p>FWIW, the relevant section of <code>.bash_profile</code>, set up automatically when RVM was installed (on shared hosting, with somewhat outdated ruby no less, getting Jekyll up and running without being able to write to the server's own ruby directory means using RVM; this seems to work absolutely fine), is:</p>
  
  <pre><code>PATH=$PATH:$HOME/bin
  
  export PATH
  
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
  </code></pre>
  
  <p>Am I calling my user profile for use in the cron environment wrongly? Am I missing something glaringly obvious in the syntax? Any help would be much appreciated.</p>