# Confused about deprecation warnings in 2.0(.2)

**URL:** <https://www.ruby-forum.com/t/confused-about-deprecation-warnings-in-2-0-2/135463>\
**Category:** Rails\
**Created:** [April 22, 2008, 1:43pm UTC](https://www.ruby-forum.com/t/confused-about-deprecation-warnings-in-2-0-2/135463 "2008-04-22T13:43:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Diggins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f04885/32.png) [@Tim\_Diggins](https://www.ruby-forum.com/u/Tim_Diggins)\
**Post date:** [April 22, 2008, 1:43pm UTC](https://www.ruby-forum.com/t/confused-about-deprecation-warnings-in-2-0-2/135463/1 "2008-04-22T13:43:59Z")

</div>

Hi -

(FYI: I’ve recently moved to rails 2, fairly new to rails)

When running my tests, I’m getting some odd deprecation warnings:

1. 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.](http://www.rubyonrails.org/deprecation) for  
details, but are not listed there (hmmm)

2. 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…

1. 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.](http://www.rubyonrails.org/deprecation)  
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:
2. 

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)

---

<div class="post-metadata">

**Author:** ![Tim\_Diggins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f04885/32.png) [@Tim\_Diggins](https://www.ruby-forum.com/u/Tim_Diggins)\
**Post date:** [April 22, 2008, 1:46pm UTC](https://www.ruby-forum.com/t/confused-about-deprecation-warnings-in-2-0-2/135463/2 "2008-04-22T13:46:54Z")

</div>

On 22 Apr 2008, at 10:44, Tim Diggins wrote:

> 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)

This may be part of your problem: you’ve ended up with edge rails (ie  
the bleeding edge). This can happen if you’ve got [gems.rubyonrails.org](http://gems.rubyonrails.org)  
as once of your gem sources. This has happened to a few people  
recently, so you should be able to dig out instructions on how to fix  
this (I can;t remember off the top of my head)

Fred

---

<div class="post-metadata">

**Author:** ![Tim\_Diggins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f04885/32.png) [@Tim\_Diggins](https://www.ruby-forum.com/u/Tim_Diggins)\
**Post date:** [April 24, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/confused-about-deprecation-warnings-in-2-0-2/135463/3 "2008-04-24T19:26:10Z")

</div>

On Apr 22, 12:45 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> On 22 Apr 2008, at 10:44, Tim Diggins wrote:

> This may be part of your problem: you’ve ended up with edge rails (ie  
> the bleeding edge). This can happen if you’ve got [gems.rubyonrails.org](http://gems.rubyonrails.org)  
> as once of your gem sources. This has happened to a few people  
> recently, so you should be able to dig out instructions on how to fix  
> this (I can;t remember off the top of my head)

Yes, thank you, that was exactly it.

Removing each of the gems (gem uninstall GEMNAME gives a nice version  
selector), removing the [gems.rubyonrails.org](http://gems.rubyonrails.org) source (gem sources -r  
[http://gems.rubyonrails.org](http://gems.rubyonrails.org)) and reupdating (gem update GEMNAME, or  
just gem update) solved ALL my problems (though I had to make sure  
some autogenerated files had 2.0.2 rather than edge defaults).

I had a suspicion that this was the case, but whenever I looked up  
“edge rails” (in the books, and in the online docs) the opposition was  
between edge rails (frozen in vendor/rails) and the ‘gem’ version  
(really a gem of the release). But the fact that there are actually  
gems of edge rails makes this terminology confusing.
