views:

691

answers:

2

Just followed the Authlogic tutorial. I am getting "uninitialized constant Authlogic" when I try run the app. After searching, I can see that it has to do with gems/plugins but I can't find a solution.

Edit:

My UserSession model is:

class UserSession < Authlogic::Session::Base
end
+3  A: 

Is it in your environment.rb file? If it is, did you restart your server?

If you're using Rails 3, is it in your Gemfile, and did you restart your server?

Most of all, did you install the gem?

Garrett
I forgot to restart the server! I read it didn't need to be restarted in development mode so that wasn't in my mind at all. Thanks!
GreenRails
It happens to all of us! No worries
Garrett
A: 

Hi !

I'm trying to use AuthLogic with Rails3. And I obtain the same error.

I installed the gem on this way :

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

No problem with the bundle install command. AuthLogic is correctly installed in version 2.1.3

I tried to install AuthLogic as a plugin with command :

rails plugin install git://github.com/binarylogic/authlogic.git

I get the error :

Could not find gem 'authlogic (>= 0, runtime)' in any of the sources.

A partner tries this same command and gets no error.

By the way, the AuthLogic version on gemcutter.org is not functional yet for rails 3. You'll have some errors on starting local server. Prefer the patched version on git://github.com/binarylogic

Thanks in advance to those who can help me for my two problems !

V

Plume
Shame on me !I wrote `AuthLogic` instead of `Authlogic`.And for no obvious reason, the plugin install work well now :/
Plume
Plume: thanks for your comment, I made the exact same mistake re AuthLogic vs Authlogic
Alan Jackson