[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

cattr_accressor Error --Help

Jim Mundy

9/16/2006 6:22:00 PM



I get the following error when I try running my script. I thought it
might be a path issuse and did a complete reinstallation using the
Hivelogic installation procedure for macs. (Building Ruby, Rails,
LightTPD, and MySQL on Tiger). Please note(Even though I did the
reinstall, I get the impression that the old install is still active/in
play) When I issue a locate command for rails or activerecord it
reflects the old/original version number.

Any suggestions would be greatly appreciated.

Thanks

ruby script.rb

/usr/local/lib/ruby/site_ruby/1.8/active_record/base.rb:246: undefined
method `cattr_accessor' for ActiveRecord::Base:Class (NoMethodError)
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/local/lib/ruby/site_ruby/1.8/active_record.rb:37
from ./db.rb:1
from script.rb:3


--
Posted via http://www.ruby-....

1 Answer

Austin Ziegler

9/25/2006 12:08:00 PM

0

On 9/16/06, Jim Mundy <mutuelinvestor@gmail.com> wrote:
> I get the following error when I try running my script. I thought it
> might be a path issuse and did a complete reinstallation using the
> Hivelogic installation procedure for macs. (Building Ruby, Rails,
> LightTPD, and MySQL on Tiger). Please note(Even though I did the
> reinstall, I get the impression that the old install is still active/in
> play) When I issue a locate command for rails or activerecord it
> reflects the old/original version number.
>
> Any suggestions would be greatly appreciated.
>
> Thanks
>
> ruby script.rb
>
> /usr/local/lib/ruby/site_ruby/1.8/active_record/base.rb:246: undefined
> method `cattr_accessor' for ActiveRecord::Base:Class (NoMethodError)
> from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
> from /usr/local/lib/ruby/site_ruby/1.8/active_record.rb:37
> from ./db.rb:1
> from script.rb:3

This is a Rails-specific question. cattr_accessor is not a standard Rubyism.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca