How can I track the DEPRECATION WARNING associated with the bundler

I am new to Rails. I continue to see these deprecation warnings when I launch my application:

DEPRECATION WARNING: ref is deprecated and will be removed from Rails 3.2. (called from <top (required)> at D:/dev/AquaticKodiak/config/application.rb:12) DEPRECATION WARNING: new is deprecated and will be removed from Rails 3.2. (called from <top (required)> at D:/dev/AquaticKodiak/config/application.rb:12) 

OK, what's on line 12? It:

Bundler.require(:default, :assets, Rails.env)

Hmm, that doesn't narrow it down. This tells me that one of the stones associated with my application uses a keyword that will disappear soon. I really would like to find out which one. All gems in my gemfile use the syntax >= [version] , with the exception of those coming from github. I suspect github stuff is causing this, but how do you know which project it is? Pulling code and searching for a keyword looks like work - is there an easier way?

+7
source share
1 answer

The Rails exception warning is useless here. It has a full column that can help you find an outdated gem, but filters the result to return the first non-frame point to the column, in this case application.rb.

To find the offending stone, I would grab the full column in ActiveSupport :: Deprecation.warn, which is defined in line 10 activesupport / lib / active_support / deprecation / report.rb.

If you installed (recommended) Pry , add a conditional binding on line 11 of report.rb:

 binding.pry if message =~ /ref is deprecated/ 

Then inspect the caller.

If you publish a gemfile, I can find you.

+4
source

All Articles