Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to locate where deprecated RAILS_ROOT is used

When I load rails (rails s) the first line that shows up in the terminal is:

DEPRECATION WARNING: RAILS_ROOT is deprecated. Please use ::Rails.root.to_s. (called from /Users/x/Sites/x/config/application.rb:7)

I have been unable to isolate where this is being used.

Line 7 mentioned above is:

Bundler.require(:default, Rails.env) if defined?(Bundler)

Does anyone have any suggestion?

like image 927
AnApprentice Avatar asked May 13 '11 04:05

AnApprentice


1 Answers

One of your gems is using RAILS_ROOT in its initialization code.

From your app's bundle directory, try: grep -R RAILS_ROOT .

(If you are using RVM, the bundle directory will be in ~/.rvm/gems; otherwise it may be .bundle within your app's main directory.)

like image 97
Paul Rosania Avatar answered Oct 05 '22 02:10

Paul Rosania