Hi -
(FYI: I’ve recently moved to rails 2, fairly new to rails)
When running my tests, I’m getting some odd deprecation warnings:
-
the warnings refer to Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. for
details, but are not listed there (hmmm) -
one of the warnings is obvious how to fix in my code:
DEPRECATION WARNING: errors#on have been deprecated, please use
errors#[] instead
But it is also occurring in various places in the libraries, e.g.
(called from on at /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2.9216/
lib/active_record/validations.rb:121)
which is possibly just a slight version mismatch, but would be rather
surprising…
- another of the warnings I don’t quite understand, and thus am not
sure the implications of fixing it in the way suggested:
.DEPRECATION WARNING: Wrapping input tags in error in a div is
deprecated. By Rails 3.0 well add a CSS class called “error” to the
tag instead. Set config.action_view.class_based_error_markings = true
in your config to be ahead of the curve. See
Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.
for details. (called from tag at /Library/Ruby/Gems/1.8/gems/
actionpack-2.0.2.9216/lib/action_view/helpers/active_record_helper.rb:
any light to shed on my darkness?
many thanks
Tim
NB: In case this is relevant, I found it difficult to specify exactly
the “RAILS_GEM_VERSION” in application.rb - I settled on “>= 2.0”
because “2.0.2” wasn’t found (only “2.0.2.9216” worked, and that
seemed a bit of a specific…) Various other options either worked for
script/server, or worked for rails test, but not both)