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_ENV in favour of Rails.env, and
RAILS_DEFAULT_LOGGER in favour of Rails.logger.

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

猜你喜欢

转载自pvpful.iteye.com/blog/1177425
今日推荐