Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

ActionController::RoutingError (undefined method `class_inheritable_accessor' for #<Class:0x00000005072600> #81

Open
iyerkartikv opened this issue Apr 14, 2012 · 5 comments

Comments

@iyerkartikv
Copy link

I am new to ruby and rails. I am using ruby 1.92 and rails 3.2.3.
In my web application I am trying to use vestal_versions, in my model USER, I have written the following code:

class User < ActiveRecord::Base
versioned
attr_accessible :email, :name
end.

However now when I try to create to run my server, which in turn tries to show the index page of users, it errors out giving below error.

Can anyone please let me know how I can fix this? I searched for this issue in google and other forums however could not find any solution to the same hence posting this new issue.

Thanks and regards,
Kartik

DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in VestalVersions::Deletion instead. (called from include at /usr/local/lib/ruby/gems/1.9.1/bundler/gems/vestal_versions-6273df533f85/lib/vestal_versions.rb:118)

ActionController::RoutingError (undefined method class_inheritable_accessor' for #<Class:0x00000005072600>): app/models/user.rb:3:inclass:User'
app/models/user.rb:1:in <top (required)>' app/controllers/users_controller.rb:1:in<top (required)>'

@zhangyuan
Copy link

According to this article http://www.strictlyuntyped.com/2010/05/tweaking-on-rails-30-3-classattribute.html , should class_attribute be used instead of class_inheritable_accessor ?

@hrasguido
Copy link

same error

@pboling
Copy link

pboling commented Jan 18, 2013

Getting this same error... well almost:

gems/activerecord-3.2.11/lib/active_record/dynamic_matchers.rb:55:in `method_missing': undefined method `class_inheritable_accessor' for #<Class:0x007febfd7582d0> (NoMethodError)

@pboling
Copy link

pboling commented Jan 18, 2013

Fixes are in trunk, but the gem has not been released with these fixes yet. To get it to work with rails 3.2:

gem 'vestal_versions', github: 'laserlemon/vestal_versions'

@pboling
Copy link

pboling commented Jan 18, 2013

But there is another error related to the attr_accessible still on master. This pull request has a fix!

gem 'vestal_versions', github: 'justintanner/vestal_versions'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants