# Cattr\_accessor not found for testing?

**URL:** <https://www.ruby-forum.com/t/cattr-accessor-not-found-for-testing/55858>\
**Category:** Engines Development\
**Created:** [March 24, 2006, 10:31am UTC](https://www.ruby-forum.com/t/cattr-accessor-not-found-for-testing/55858 "2006-03-24T10:31:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [March 24, 2006, 10:31am UTC](https://www.ruby-forum.com/t/cattr-accessor-not-found-for-testing/55858/1 "2006-03-24T10:31:34Z")

</div>

Hi there.

I try to develop an activerecord adapter. Trying to launch the tests,  
I’ve got an error:

undefined method ‘cattr\_accessor’  
from ActiveRecord::Base:Class (NoMethodError)

I could not find this method anywhere in the source of the fresh svn  
trunk I take.

How to find this method ? any help welcome.  
Tony

PS: I find this method … in a “monnay” package on google ???

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [March 24, 2006, 10:35am UTC](https://www.ruby-forum.com/t/cattr-accessor-not-found-for-testing/55858/2 "2006-03-24T10:35:39Z")

</div>

Tony wrote:

> …  
> PS: I find this method … in a “money” package on google ???

Ok also find in Facets. I will try to install the Facets modules.

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [March 24, 2006, 11:07am UTC](https://www.ruby-forum.com/t/cattr-accessor-not-found-for-testing/55858/3 "2006-03-24T11:07:58Z")

</div>

Tony wrote:

> Ok also find in Facets. I will try to install the Facets modules.

… and it does not work “simply”. I try to dig in Gems documentation  
and perharps adding a require in the base.rb of active\_record.

Is all working fine with your installation ?

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [March 24, 2006, 12:36pm UTC](https://www.ruby-forum.com/t/cattr-accessor-not-found-for-testing/55858/4 "2006-03-24T12:36:26Z")

</div>

Tony - please try posting this to the main Rails list, rather than the  
engines developers list.

Good luck,

- james

On 3/24/06, Tony [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> engine-developers mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org](http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org)

–

- J \*  
~

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [April 12, 2006, 10:11pm UTC](https://www.ruby-forum.com/t/cattr-accessor-not-found-for-testing/55858/5 "2006-04-12T22:11:36Z")

</div>

issue the following on command line before starting the tests:  
export RUBYOPT=-rubygems

worked for me, good luck

Tony wrote:

> Hi there.
> 
> I try to develop an activerecord adapter. Trying to launch the tests,  
> I’ve got an error:
> 
> undefined method ‘cattr\_accessor’  
> from ActiveRecord::Base:Class (NoMethodError)
> 
> I could not find this method anywhere in the source of the fresh svn  
> trunk I take.
> 
> How to find this method ? any help welcome.  
> Tony
> 
> PS: I find this method … in a “monnay” package on google ???

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [April 16, 2006, 2:45am UTC](https://www.ruby-forum.com/t/cattr-accessor-not-found-for-testing/55858/6 "2006-04-16T02:45:53Z")

</div>

Tony wrote:

> Hi there.
> 
> I try to develop an activerecord adapter. Trying to launch the tests,  
> I’ve got an error:
> 
> undefined method ‘cattr\_accessor’  
> from ActiveRecord::Base:Class (NoMethodError)

You need activesupport. If you used svn, then checkout the whole rails  
tree – if you installed activerecord – then make sure you have  
activesupport installed as well. Also the versions need to match and all  
. . .
