Good day. I have followed the directions as outlined here in the wiki http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem However, when I attemp to connect to http://localhost:3000/account/signup and I enter a username and password and click signup, I get the following error: Not Found ''/account/welcome'' not found. However, inspection of the log shows the following error occurring: Unknown column ''j.user_id'' in ''where clause'': SELECT t.*, j.* FROM roles_users j, roles t WHERE t.id = j.role_id AND j.user_id = 1 The problem is the j.user_id it should be j.userS_id. Has anyone else experienced this problem with MySQL on WinXP SP2 running WebBrick? If you have, what did you do to correct the issue (if you have found a solution to the issue)? Thanks in advance for any help. M Damon Hill Project Manager IFWORLD, Inc. www.ifworld.com <http://www.ifworld.com/> "..as we''re sung to sleep by philosophies that sing save the trees and kill the children...." -- while you were sleeping (casting crowns) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Oct 7, 2005, at 0:05, Damon Hill wrote:> Unknown column ''j.user_id'' in ''where clause'': SELECT t.*, j.* FROM > roles_users j, roles t WHERE t.id = j.role_id AND j.user_id = 1 > > The problem is the j.user_id it should be j.userS_id.If you''ve followed the instructions from the Wiki [1] and generally follow Rails conventions, the field should indeed be called user_id, not users_id. I would change it to user_id if possible. If it isn''t possible, you need to specify the keyname on the habtm associations: class User < ActiveRecord::Base has_and_belongs_to_many :roles, :foreign_key => ''users_id'' end class Role < ActiveRecord::Base has_and_belongs_to_many :users, :association_foreign_key => ''users_id'' end [1] http://wiki.rubyonrails.com/rails/pages/AccessControlListExample -- Jakob Skjerning - http://mentalized.net