title: Rails does not fire my after_commit callback
body: <p>Hello I have a peculiar problem. I use an after_commit callback to send notifications, but it seems the callback is not triggered at all. Simplified the situation looks like this:</p>
  
  <pre><code>class Message &lt; ActiveRecord::Base
    after_commit :do_something
  
    def do_something
      raise 'Doing something'
    end
  end
  </code></pre>
  
  <p>Then I expected to see the raise when I open the console and create a message. But nothing happens. Furthermore rails does not even complain if I delete the 'do_something' method completely. Note that this is not a test with transactional fixtures. I even see the record committed in the db. My rails version is 3.0.9. Thanks for any help especially if it's good :-)</p>
  
  <p>Edit: I learned later that the callback DID get triggered when I deployed the code to a different machine. So it must be something with my setup. Still I would appreciate your insight about what could be causing this.</p>
  
  <p>Edit2: From the comments.</p>
  
  <ul>
  <li>The DB is MySQL so transactions are present.</li>
  <li>Specifying the action of the callback did not help (:on => :create).</li>
  <li>I need after_commit and no other callback</li>
  </ul>