Can't get authlogic 3.1 working with rails 3.2.3 #316

Closed
zenzei opened this Issue May 18, 2012 · 4 comments

Projects

None yet

3 participants

@zenzei
zenzei commented May 18, 2012

When I add the authlogic gem to Gemfile, I can't get rails working anymore. The error is related to the inheritable_attributes that was remove in rails 3.2. Anyone has manage to fix this error?

Here is the full stracktrace

$ rails generate controller user_sessions
c:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/dynamic_matchers.rb:50:in `method_m
issing': undefined local variable or method `inheritable_attributes' for ActiveRecord::Base:Class (NameError
)
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic/acts_as_authen
tic/base.rb:64:in `acts_as_authentic_modules'
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic/acts_as_authen
tic/base.rb:44:in `add_acts_as_authentic_module'
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic/acts_as_authen
tic/email.rb:11:in `block in included'
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic/acts_as_authen
tic/email.rb:9:in `class_eval'
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic/acts_as_authen
tic/email.rb:9:in `included'
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic/acts_as_authen
tic/base.rb:96:in `include'
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic/acts_as_authen
tic/base.rb:96:in `<top (required)>'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:
in `require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:
in `block in require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:
in `load_dependency'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:
in `require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic.rb:59:in `bloc
k in <top (required)>'
        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic.rb:6:in `each'

        from c:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/authlogic-a087ad0cba3c/lib/authlogic.rb:6:in `<top
(required)>'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `block (2 levels
) in require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `each'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `block in requir
e'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
        from C:/Users/l05832/Documents/Aptana Studio 3 Workspace/entries/config/application.rb:7:in `<top (r
equired)>'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:24:in `require'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:24:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>

Thanks in advance!

@tonyjiang

I am having exactly the same problem.

@jDeppen
jDeppen commented Jun 22, 2012

Same here, did you find a solution?

@zenzei
zenzei commented Jul 5, 2012

Well, I don't know if it's the same problem you have, but my problem was a wrong definition in the Gemfile, because following a non official authlogic rails 3 tutorial.

I had this in the Gemfile

gem "authlogic", :git => "git://github.com/odorcicd/authlogic.git", :branch => "rails3"

But the correct one is

gem "authlogic", :git => "git://github.com/binarylogic/authlogic.git"

After this change all works good, so I will close the issue. Hope it helps!

@zenzei zenzei closed this Jul 5, 2012
@jDeppen
jDeppen commented Jul 18, 2012

For me it was an authlogic_rpx issue (no 3.2 support). Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment