title: How to detect what causes a deprecation warning in Rake
body: <p>When I do <code>bundle exec rake -T</code> (or <code>bundle exec rake</code>), I get deprecation warnings:</p>
  
  <pre><code>Andrews-Air:nabu agrimm$ bundle exec rake --trace -T
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  [DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
  rake about                               # List versions of all Rails frameworks and the environment
  [snip]
  </code></pre>
  
  <p>Although not really relevant, here's the Gemfile:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '~&gt; 3.2.22.2'
  
  gem 'mysql2'
  
  group :assets do
    gem 'coffee-rails', '~&gt; 3.2.1'
    gem 'compass-rails'
  
    gem 'therubyracer'
    gem 'libv8'
  
    gem 'uglifier', '&gt;= 1.0.3'
  end
  
  gem 'jquery-rails'
  gem 'haml-rails'
  gem 'to-csv', :require =&gt; 'to_csv'
  gem 'kaminari'
  gem 'oai'
  gem 'analytical'
  
  gem 'country-select'
  gem 'activeadmin'
  gem 'sass-rails',  '~&gt; 3.2.3'
  gem 'meta_search', '&gt;= 1.1.0.pre'
  
  gem 'devise', '2.2.3'
  gem 'cancancan', '~&gt; 1.12.0'
  
  gem 'squeel'
  gem 'nilify_blanks'
  
  gem 'sunspot_rails'
  gem 'sunspot_solr'
  
  gem 'unicorn'
  
  gem 'ruby-filemagic'
  
  gem 'capistrano'
  gem 'capistrano-ext'
  gem 'capistrano-unicorn'
  
  gem 'rollbar', '~&gt; 2.8.3'
  gem 'newrelic_rpm'
  
  gem 'progress_bar'
  gem 'paper_trail', '~&gt; 2'
  gem 'quiet_assets'
  gem 'roo', '~&gt; 2.1.0'
  gem 'roo-xls', :github =&gt; 'roo-rb/roo-xls', :ref =&gt; '0a5ef88'
  gem 'streamio-ffmpeg'
  gem 'rake'
  
  gem 'rmagick'
  
  gem 'whenever', :require =&gt; false
  
  group :development, :test do
    gem 'turn', '~&gt; 0.8.3', :require =&gt; false
    gem 'rspec-rails', '~&gt; 2.0'
    gem 'sextant'
    gem 'thin'
  
    gem 'spring'
    gem 'spring-commands-rspec'
  
    gem 'pry'
    gem 'pry-rails'
  
    gem 'letter_opener'
  
    gem 'guard-bundler'
    gem 'guard-rails'
    gem 'guard-rspec'
    gem 'guard-sunspot'
  
    gem 'rb-inotify', :require =&gt; RUBY_PLATFORM.include?('linux') ? 'rb-inotify' : false
    gem 'rb-fsevent', :require =&gt; RUBY_PLATFORM.include?('darwin') ? 'rb-fsevent' : false
  end
  
  group :development do
    gem 'annotate'
    gem 'binding_of_caller'
    gem 'better_errors'
    gem 'rubocop'
  end
  
  group :test do
    gem 'capybara'
    gem 'poltergeist'
    gem 'factory_girl_rails'
    gem 'database_cleaner'
    gem 'email_spec'
    gem 'launchy'
  end
  </code></pre>
  
  <p>Doing a <code>git grep -i last_comment</code> indicates it's not in my code - presumably it's in a third-party gem.</p>
  
  <p>How do I work out what causes the deprecation warnings?</p>