# Trouble redefining ActiveRecord default error messages

**URL:** <https://www.ruby-forum.com/t/trouble-redefining-activerecord-default-error-messages/55308>\
**Category:** Rails\
**Created:** [March 19, 2006, 1:34pm UTC](https://www.ruby-forum.com/t/trouble-redefining-activerecord-default-error-messages/55308 "2006-03-19T13:34:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_LupiSSS\_n](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ea924/32.png) [@Juan\_LupiSSS\_n](https://www.ruby-forum.com/u/Juan_LupiSSS_n)\
**Post date:** [March 19, 2006, 1:34pm UTC](https://www.ruby-forum.com/t/trouble-redefining-activerecord-default-error-messages/55308/1 "2006-03-19T13:34:24Z")

</div>

Hello,

I’m redefining ActiveRecord::Errors.default\_error\_messages in order  
to translate ActiveRecord’s validation messages. I’m putting the  
redefinition in config/environment.rb.

The trouble is that I’ve found that this approach works as long as I’m  
running in development mode under WEBrick, but not on my ISP under  
production mode. I guess the issue should be related to caching Ruby  
classes, but I can’t quite figure out what’s going wrong. Any help?

–
