title: My Ruby script (automated using Whenever gem) isn't running..what am I doing wrong?
body: <p>The script is in the file fxrates_scraper.rb, code below.</p>
  
  <p>The scheduler i'm using is in the schedule.rb file, code below.</p>
  
  <p>I'm using the whenever gem, and when i type in 'bundle exec whenever' i see the task as scheduled, it seems fine. but it doesn't work: it isn't executing the script. </p>
  
  <p>what am I doing wrong? note i haven't setup capistrano or anything, i just want the script to run on my local drive. also: when i execute the script manually, it runs just fine. it's just the automation bit that isn't working.</p>
  
  <p><strong>FXRATES_SCRAPER.RB</strong></p>
  
  <pre><code> require 'open-uri'
      require 'nokogiri'
      require 'csv'
  
  # Store URL to be scraped
  url = "https://deliveroo.co.uk/restaurants/london/maida-vale?postcode=W92DE"
  
  # Parse the page with Nokogiri
  page = Nokogiri::HTML(open(url))
  
  # Display output onto the screen
  name =[]
  page.css('span.list-item-title.restaurant-name').each do |line|
    name &lt;&lt; line.text.strip
  end
  
  category = []
  page.css('span.restaurant-detail.detail-cat').each do |line|
    category &lt;&lt; line.text.strip
  end
  
  delivery_time = []
  page.css('span.restaurant-detail.detail-time').each do |line|
    delivery_time &lt;&lt; line.text.strip
  end
  
  distance = []
  page.css('span.restaurant-detail.detail-distance').each do |line|
    distance &lt;&lt; line.text.strip
  end
  
  status = []
  page.css('li.restaurant--details').each do |line|
    if line.attr("class").include? "unavailable"
      sts = "closed"
    else
      sts = "open"
    end
    status &lt;&lt; sts
  end
  
  # Write data to CSV file
  CSV.open("deliveroo.csv", "w") do |file|
  file &lt;&lt; ["Name", "Category", "Delivery Time", "Distance", "Status"]
    name.length.times do |i|
        file &lt;&lt; [name[i], category[i], delivery_time[i], distance[i], status[i]]
    end
  end
  </code></pre>
  
  <p><strong>SCHEDULE.RB</strong></p>
  
  <pre><code>set :output, "#{path}/log/cron.log"
  every 2.minutes do
    command "ruby '#{path}/fxrates_scraper.rb'"
  end
  </code></pre>
  
  <p><strong>OUTPUT FROM RUNNING 'BUNDLE EXEC WHENEVER' COMMAND</strong></p>
  
  <pre><code> Faisals-Air:whatrate fkhalid2008$ bundle exec whenever
  0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /bin/bash -l -c 'ruby '\''/Users/fkhalid2008/whatrate/fxrates_scraper.rb'\'' &gt;&gt; /Users/fkhalid2008/whatrate/log/cron.log 2&gt;&amp;1'
  
  ## [message] Above is your schedule file converted to cron syntax; your crontab file was not updated.
  </code></pre>