# Observers doesnt get registred in productize

**URL:** <https://www.ruby-forum.com/t/observers-doesnt-get-registred-in-productize/47840>\
**Category:** Rails\
**Created:** [November 14, 2005, 12:37pm UTC](https://www.ruby-forum.com/t/observers-doesnt-get-registred-in-productize/47840 "2005-11-14T12:37:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristian.lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@kristian.lists](https://www.ruby-forum.com/u/kristian.lists)\
**Post date:** [November 14, 2005, 12:37pm UTC](https://www.ruby-forum.com/t/observers-doesnt-get-registred-in-productize/47840/1 "2005-11-14T12:37:44Z")

</div>

Hi!

My observers doesn’t get registred by active record.  
I’m doing a refactoring of a site into products by the framework  
productize (i love the concept).  
Currently all my observers are located in “lib” and loaded (i have tried  
require and require\_dependency) during initialising of the rails-app  
(from bottom of environment.rb).  
The observers are loaded with the MyObserver.instance after the  
declaration of its class. This works in the old app.

I have tried and using the method  
config.active\_record.observers=:my\_observer during  
Rails::Initializer.run but this doesn’t helps either.

We are using some other peoples code for making productize adoption to  
rails 0.14, so its possible that he or she has maked any tweakings that  
interfers with default behavior for ActiveRecord::Observer. I have  
looked in productize.rb, boot.rb, development.rb and everything seems to  
be ok.  
I’m doing any fundamental error here? Any help appreciated!

/kristian

---

<div class="post-metadata">

**Author:** ![kristian.lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@kristian.lists](https://www.ruby-forum.com/u/kristian.lists)\
**Post date:** [November 14, 2005, 1:22pm UTC](https://www.ruby-forum.com/t/observers-doesnt-get-registred-in-productize/47840/2 "2005-11-14T13:22:46Z")

</div>

On 14-nov-2005, at 12:37, Kristian H. wrote:

> We are using some other peoples code for making productize adoption to  
> rails 0.14

If you have canadaduane’s Productize working with current Rails I  
think there’s lots of people that would like to know about it, me  
being one of them ;).

–  
Regards, Charles.

---

<div class="post-metadata">

**Author:** ![kristian.lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@kristian.lists](https://www.ruby-forum.com/u/kristian.lists)\
**Post date:** [November 14, 2005, 3:13pm UTC](https://www.ruby-forum.com/t/observers-doesnt-get-registred-in-productize/47840/3 "2005-11-14T15:13:58Z")

</div>

Well, that is how you define “working”. Generators, scripts and so on  
doesn’t work out of the box (did that work with 0.13?). But the  
site-product seems to be up and running with the base nicely.

The problem is that I dont know who the author of this package is and  
which and how much changes that are done 😕  
But I can’t let down a rails-friend 🙂 so I uploaded the file to my blog  
[http://kristian.delamednoll.se](http://kristian.delamednoll.se)

Maybe the author of this package (productize.tgz) reads this? Please let  
us know 🙂

Hope I dont step on anybodys foot or creates any expectations here 😕

---

<div class="post-metadata">

**Author:** ![kristian.lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@kristian.lists](https://www.ruby-forum.com/u/kristian.lists)\
**Post date:** [November 15, 2005, 5:21pm UTC](https://www.ruby-forum.com/t/observers-doesnt-get-registred-in-productize/47840/4 "2005-11-15T17:21:18Z")

</div>

This problem seems to be resolved when I run the application in  
production mode. Should I set some variable in production.rb?

/kristian

---

<div class="post-metadata">

**Author:** ![kristian.lists](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/c77e96/32.png) [@kristian.lists](https://www.ruby-forum.com/u/kristian.lists)\
**Post date:** [November 15, 2005, 8:55pm UTC](https://www.ruby-forum.com/t/observers-doesnt-get-registred-in-productize/47840/5 "2005-11-15T20:55:21Z")

</div>

tis 2005-11-15 klockan 17:18 +0100 skrev Kristian H.:

> This problem seems to be resolved when I run the application in  
> production mode. Should I set some variable in production.rb?

I mean development.rb 😛
