title: Ruby cron job throws "no such file to load -- deprecated" error
body: <p>I scheduled this cronjob:</p>
  
  <pre><code>ruby twitter_bots/tweet_bots.rb
  </code></pre>
  
  <p><strong>tweet_bots.rb:</strong></p>
  
  <pre><code>#!/usr/bin/ruby
  
  require 'rubygems'
  require '/home/david/twitter_bots/twitterbot.rb'
  
  mcnulty = TwitterBot.new('jamesmcnulty')
  mcnulty.tweet
  mcnulty.reply
  mcnulty.close
  </code></pre>
  
  <p><strong>twitterbot.rb:</strong></p>
  
  <pre><code>require 'dbi'
  require 'twitter'
  
  class TwitterBot
      ...
  </code></pre>
  
  <p><strong>The cron has these environmental variables:</strong></p>
  
  <pre><code>SHELL=/bin/sh
  PATH=/home/david/.rvm/gems/ruby-1.9.2-p290/bin:/home/david/.rvm/gems/ruby-1.9.2-p290@global/bin:/home/david/.rvm/rubies/ruby-1.9.2-p290/bin:/home/david/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  HOME=/home/david
  LOGNAME=david
  </code></pre>
  
  <p><strong>But it throws this error:</strong></p>
  
  <pre><code>/home/david/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- deprecated (LoadError)
      from /home/david/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from /home/david/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/dbi.rb:48:in `&lt;top (required)&gt;'
      from /home/david/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from /home/david/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from /home/david/twitter_bots/twitterbot.rb:1:in `&lt;top (required)&gt;'
      from /home/david/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from /home/david/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
      from twitter_bots/tweet_bots.rb:5:in `&lt;main&gt;'
  </code></pre>
  
  <p>I can see that the error comes from <code>/home/david/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/dbi.rb:48</code> where it has <code>require "deprecated"</code></p>
  
  <p>But I have the deprecated gem v 2.0.1 installed. I also tried it with version 3.0.0.</p>
  
  <p>When I run it manually, it works. What's wrong with the cron?</p>