use Rails.root instead RAILS_ROOT in rake task for Rails 3

I was getting this error running the rake db:data:load task: uninitialized constant Rails::DeprecatedConstant::Rails, reading the rails 3 changelog I get realized about this

Railties now deprecates:

RAILS_ROOT in favour of Rails.root,

RAILS_ENVinfavourofRails.env,and

RAILS_DEFAULT_LOGGER in favour of Rails.logger.

from:https://github.com/ludicast/yaml_db/pull/13

相关推荐