Hi to all, i have installed authlogic as shown in this tutorial http://www.dixis.com/?p=352. The fields i have used are t_login, t_password, t_name, t_password_salt, t_persistence_token. When i go to home#index, i get this error: NameError in HomeController#index uninitialized constant Authlogic ... Application Trace | Framework Trace | Full Trace app/models/user_session.rb:1 app/controllers/application_controller.rb:10:in `current_user_session'' app/controllers/application_controller.rb:16:in `current_user'' app/controllers/application_controller.rb:21:in `require_user'' .... Do you know what this comes from??? Thank you in advance Kostas L. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Anyone??? Any ideas??? I really cant find a sollution in the web... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Uninitialized constant usually means that the the module hasn''t been loaded into the Rails environment. Adding an initializer file might fix it, but it seems to me that this shouldn''t be necessary with Authlogic. Make sure you''re using the most updated version of Authlogic. # config/initializers/authlogic.rb require '' authlogic'' -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, i have installed Authlogic using gem "authlogic" in the gemfile. I also run bundle install and i did not got an error. I have created an new application from scratch and now i get the following error: NoMethodError in User_sessions#new Showing G:/.../AuthlogicTest/app/views/user_sessions/new.html.erb where line #6 raised: Model UserSession does not respond to t_login Extracted source (around line #6): 3: <%= form_for @user_session, :url => {:action => "create"} do |f|%> 4: <%= f.error_messages%> 5: <%= f.label :t_login%> 6: <%= f.text_field :t_login%> 7: <%= f.label :t_password%> 8: <%= f.password_field :t_password%> 9: <%div%> I havent found a sollution yet...... Any ideas?? Thank you again On Nov 21, 9:55 pm, "Arailsdemo A." <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Uninitialized constant usually means that the the module hasn''t been > loaded into the Rails environment. Adding an initializer file might fix > it, but it seems to me that this shouldn''t be necessary withAuthlogic. > Make sure you''re using the most updated version ofAuthlogic. > > # config/initializers/authlogic.rb > require ''authlogic'' > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 26 November 2010 21:03, Kostas L. <louposk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > i have installed Authlogic using gem "authlogic" in the gemfile. I > also run bundle install and i did not got an error. > > I have created an new application from scratch and now i get the > following error: > NoMethodError in User_sessions#new > > Showing G:/.../AuthlogicTest/app/views/user_sessions/new.html.erb > where line #6 raised: > > Model UserSession does not respond to t_login > Extracted source (around line #6): > > 3: <%= form_for @user_session, :url => {:action => "create"} do |f|%> > 4: <%= f.error_messages%> > 5: <%= f.label :t_login%> > 6: <%= f.text_field :t_login%>Is there a t_login column in the UserSession table? Are you sure? Did you remember to run the migration to add it? If the answer is yes then please post schema.rb and user_session.rb If that is large then use pastie.org Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, My project does not have an authlogic.rb file to write the require "authlogic" line..... What i have done is i have installed authlogic in the gemfile using gem ''authlogic'', :git => ''git://github.com/odorcicd/ authlogic.git'', :branch => ''rails3''. Then i run the command bundle install and i didn''t got any errors. I have created from scratch a new application and now i get the following errors: NoMethodError in User_sessions#new Showing G:/.../AuthlogicTest/app/views/user_sessions/new.html.erb where line #6 raised: Model UserSession does not respond to t_login Extracted source (around line #6): 3: <%= form_for @user_session, :url => {:action => "create"} do |f|%> 4: <%= f.error_messages%> 5: <%= f.label :t_login%> 6: <%= f.text_field :t_login%> 7: <%= f.label :t_password%> 8: <%= f.password_field :t_password%> 9: <%div%> When i comment out the text and password field i see the form but with no fields. I havent found a sollution yet. I googled the problem but nothing. Any other idea?? Thanks again! On Nov 21, 9:55 pm, "Arailsdemo A." <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Uninitialized constant usually means that the the module hasn''t been > loaded into the Rails environment. Adding an initializer file might fix > it, but it seems to me that this shouldn''t be necessary withAuthlogic. > Make sure you''re using the most updated version ofAuthlogic. > > # config/initializers/authlogic.rb > require ''authlogic'' > > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi colin, i dont see any UserSession table... On Nov 26, 11:10 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 26 November 2010 21:03, Kostas L. <loup...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > Hi, > > i have installedAuthlogicusing gem "authlogic" in the gemfile. I > > also run bundle install and i did not got anerror. > > > I have created an new application from scratch and now i get the > > followingerror: > > NoMethodError in User_sessions#new > > > Showing G:/.../AuthlogicTest/app/views/user_sessions/new.html.erb > > where line #6 raised: > > > Model UserSession does not respond to t_login > > Extracted source (around line #6): > > > 3: <%= form_for @user_session, :url => {:action => "create"} do |f|%> > > 4: <%= f.error_messages%> > > 5: <%= f.label :t_login%> > > 6: <%= f.text_field :t_login%> > > Is there a t_login column in the UserSession table? > Are you sure? Did you remember to run the migration to add it? > If the answer is yes then please post schema.rb and user_session.rb > If that is large then use pastie.org > > Colin-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 26 November 2010 21:20, Kostas L. <louposk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi colin, > i dont see any UserSession table...That''s ok (I had forgotten how authlogic works). Lets try again then :) Why have you got t_login and t_password in your view? Should it not just be :login and :password? Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi colin, i have used these names because i have already created a php application using these names and i want to create the same application in rails. Its for a project in my university. I dont want to have different field names .. Do you think the problem is the names??? I dont think so... Kostas On Nov 27, 10:51 am, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 26 November 2010 21:20, Kostas L. <loup...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi colin, > > i dont see any UserSession table... > > That''s ok (I had forgotten how authlogic works). > Lets try again then :) > Why have you got t_login and t_password in your view? Should it not > just be :login and :password? > > Colin-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 27 November 2010 12:21, Kostas L. <louposk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: Please don''t top post, it makes it difficult to follow the thread. Insert your reply into the previous post. Thanks> Hi colin, > i have used these names because i have already created a php > application using these names and i want to create the same > application in rails. > Its for a project in my university. > I dont want to have different field names .. > Do you think the problem is the names??? I dont think so...Well the error message is NoMethodError, Model UserSession does not respond to t_login which is saying the UserSession does not have a method t_login, which suggests to me that the name is the problem. Have you done something somewhere else in your code to tell Authlogic to expect the different names? It is easy enough to see if this is the problem here, just change those few lines of code and see if that error goes away. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi colin, as i have seen, authlogic does require default names like login, password etc. I was using t_login and t_password as i result getting these errors. I re-created my table with the new fields and everything works fine!!! Home that helps someone else getting the same errors!!! Thank you for your help! Kostas Κωνσταντίνος Λούπος louposk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org On Sat, Nov 27, 2010 at 2:36 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 27 November 2010 12:21, Kostas L. <louposk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Please don''t top post, it makes it difficult to follow the thread. > Insert your reply into the previous post. Thanks > > > Hi colin, > > i have used these names because i have already created a php > > application using these names and i want to create the same > > application in rails. > > Its for a project in my university. > > I dont want to have different field names .. > > Do you think the problem is the names??? I dont think so... > > Well the error message is NoMethodError, Model UserSession does not > respond to t_login which is saying the UserSession does not have a > method t_login, which suggests to me that the name is the problem. > Have you done something somewhere else in your code to tell Authlogic > to expect the different names? > > It is easy enough to see if this is the problem here, just change > those few lines of code and see if that error goes away. > > Colin > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Nov 29, 2010, at 11:58 PM, Konstantinos Loupos wrote:> Hi colin, > as i have seen, authlogic does require default names like login, password etc. I was using t_login and t_password as i result getting these errors. > I re-created my table with the new fields and everything works fine!!!You can also tell authlogic what fields to use if you don''t want to rename it... either way... -philip> Home that helps someone else getting the same errors!!! > > Thank you for your help! > Kostas > Κωνσταντίνος Λούπος > louposk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > On Sat, Nov 27, 2010 at 2:36 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > On 27 November 2010 12:21, Kostas L. <louposk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Please don''t top post, it makes it difficult to follow the thread. > Insert your reply into the previous post. Thanks > > > Hi colin, > > i have used these names because i have already created a php > > application using these names and i want to create the same > > application in rails. > > Its for a project in my university. > > I dont want to have different field names .. > > Do you think the problem is the names??? I dont think so... > > Well the error message is NoMethodError, Model UserSession does not > respond to t_login which is saying the UserSession does not have a > method t_login, which suggests to me that the name is the problem. > Have you done something somewhere else in your code to tell Authlogic > to expect the different names? > > It is easy enough to see if this is the problem here, just change > those few lines of code and see if that error goes away. > > Colin > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.