Delayed Job is failing with no log or alert
<p>Setting up a Delayed Job for the first time, and it is not working in my testing environment after following this <a href="http://railscasts.com/episodes/171-delayed-job?view=asciicast" rel="nofollow">RailsCast</a>. </p>

<p>I have two methods that I want to run - and in testing, I want to run them 15 seconds after a page loads. These methods are <code>calculate_rankings</code> and <code>update_wallet</code> from the <strong>Participation.rb</strong> model. </p>

<p>After installing the gem per the guide above, I am trying two things to debug: 1) I am running <code>rake jobs:work</code>, where there is no output after <code>Starting job worker</code>, and 2) I have added an alert to my controller's method, which does not activate. </p>

<p>Post-gem installation and <strong>running the migration</strong> (which was successful), I have made two changes in the code. </p>

<ol>
<li><del>Created <strong>app/jobs/chipsupdater.rb</strong> </del></li>
</ol>

<p><em>This was the error. The file was incorrectly named and was therefore not called correctly in the controller. It should have been <strong>app/jobs/chips_update_job.rb</strong> based on the method I wrote below</em>.</p>

<pre><code>     class ChipsUpdaterJob &lt; Struct.new(:game_id)
        def perform
          Participation.calculate_ranking(game_id)
          Participation.update_wallet(game_id)
        end
       end
</code></pre>

<ol start="2">
<li><p>Updated my <strong>ScoreboardController</strong> that I want to initialize the delayed job: </p>

<pre><code>class ScoreboardController &lt; ApplicationController
   def index

    @participations = Participation.where(finished: true, game_id: session[:game_id]).order(score: :desc).limit(10)
    @game = Game.find(params[:game_id])
   end
 def chipsupdater
    Delayed::Job.enqueue(ChipsUpdaterJob.new(params[:game_id]), :run_at =&gt; 1.minute.from_now) 
    flash[:notice] = "Things are good. Not broken."
   end 
 end
</code></pre></li>
</ol>

<p>With no flash alert or output in the jobs console, my belief is that I am not correctly calling the Delayed Job. Can you spot where I am going wrong (or why I can't debug using the jobs console)? </p>

<p><strong>EDIT</strong></p>

<p>Per the discussion in the comments, I am now running the worker in a test environment. However, I am continuing to fail to a) post jobs to my <code>DelayedJobs</code> table or b) achieve our key output, which is to use the two methods in the ChipsUpdater Job file. </p>

<p>Thus, my belief is that I am failing to correctly call the delayed job based on this failure. </p>

<p>For context, I want to include two more potentially relevant files. </p>

<p>First, here is the Participation model that is referenced in the <code>ChipUpdaterJob</code>: </p>

<pre><code>class Participation &lt; ActiveRecord::Base

ef self.calculate_ranking(game_id)
      records = Participation.where(game_id: game_id, finished: true).order('score DESC, updated_at ASC')

      records.each_with_index do |record, index|
        puts "rank: #{index + 1}"
        puts record.inspect
        puts record['score']
        puts record['user_id']
        puts record['game_id']

        Ranking.create(game_id: game_id, user_id: record['user_id'], game_time: record['updated_at'], ranking: index + 1)
    end
  end
</code></pre>

<p>If this is taken out of a delay context and run as a normal method from the Scoreboard Controller, I have confirmed locally that it runs the ranking process successfully. The delay seems to be the failure. </p>

<p><strong>/bin/delayed_job</strong> </p>

<pre><code>require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))

require 'delayed/command'
Delayed::Command.new(ARGV).daemonize
</code></pre>