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.