Hi, I successfully installed AAA couple days before, and i managed to register a uer with it, with no user activation. but for some strange reason, it stops working for the signup method, with i go to the signup page, press submit, it shows an error page, what''s wrong? here''s the error page. undefined method `activation_code'' for #<User:0x3b6dbd @errors=#<ActiveRecord::Errors:0x1a1a1c6 @errors={}, @base=#<User: 0x3b6dbd ...>>, @attributes={"salt"=>"d580c223adee13c8723434e3987a0787ad124e5b", "updated_at"=>Wed Jul 18 02:47:19 BST 2007, "remember_token_expires_at"=>nil, "crypted_password"=>"78dfec22ed3e7418647c7e90e22d0e4e93c5f375", "id"=>6, "remember_token"=>nil, "email"=>"erv2-7Ts6kVb0ZJk@public.gmane.org", "login"=>"erv2", "created_at"=>Wed Jul 18 02:47:19 BST 2007}, @new_record=false, @password="000000", @password_confirmation="000000">:User RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:101:in `transaction'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:121:in `transaction'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:133:in `save_with_transactions!'' app/controllers/account_controller.rb:28:in `signup'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:101:in `transaction'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:121:in `transaction'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:133:in `save_with_transactions!'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:631:in `call_filter'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_with_filters'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:65:in `perform_action_with_benchmark'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `measure'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_with_benchmark'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action_with_rescue'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:431:in `send'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:431:in `process'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_with_filters'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/session_management.rb: 114:in `process_with_session_management_support'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/webrick_server.rb:118:in `handle_dispatch'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/webrick_server.rb:81:in `service'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/1.8/webrick/ httpserver.rb:104:in `service'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/1.8/webrick/ httpserver.rb:65:in `run'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/1.8/webrick/ server.rb:173:in `start_thread'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/1.8/webrick/ server.rb:95:in `start'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:101:in `transaction'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:121:in `transaction'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/transactions.rb:133:in `save_with_transactions!'' app/controllers/account_controller.rb:28:in `signup'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `send'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in `perform_action'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:631:in `call_filter'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_with_filters'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:65:in `perform_action_with_benchmark'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `measure'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_with_benchmark'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action_with_rescue'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:431:in `send'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:431:in `process'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_with_filters'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/session_management.rb: 114:in `process_with_session_management_support'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/webrick_server.rb:118:in `handle_dispatch'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/webrick_server.rb:81:in `service'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/1.8/webrick/ httpserver.rb:104:in `service'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/1.8/webrick/ httpserver.rb:65:in `run'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/1.8/webrick/ server.rb:173:in `start_thread'' C:/Program Files/NetBeans 6.0M10/ruby1/jruby-1.0/lib/ruby/1.8/webrick/ server.rb:95:in `start'' --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jodi Showers
2007-Jul-18 01:58 UTC
Re: Help. Acts_as_Authenticated plugin stops working for me?
On 17-Jul-07, at 9:48 PM, Mister Yu wrote:> > Hi, > > I successfully installed AAA couple days before, and i managed to > register a uer with it, with no user activation. > > but for some strange reason, it stops working for the signup method, > with i go to the signup page, press submit, it shows an error page, > what''s wrong? here''s the error page. > > > undefined method `activation_code'' for #<User:0x3b6dbdLooks like you didn''t run the required migration - or backed it out. AAA requires a few fields - the error above means it''s looking for one that isn''t there. Jodi --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mister Yu
2007-Jul-18 10:17 UTC
Re: Help. Acts_as_Authenticated plugin stops working for me?
Hi Jodi, Thanks for the reply. I thought of that as well, but when i look at the Database Migrations->migrate->006_create_users.rb, that field isn''t there. did i skip some steps when i installed it? but it worked for me before. here is the file: class CreateUsers < ActiveRecord::Migration def self.up create_table "users", :force => true do |t| t.column :login, :string t.column :email, :string t.column :crypted_password, :string, :limit => 40 t.column :salt, :string, :limit => 40 t.column :created_at, :datetime t.column :updated_at, :datetime t.column :remember_token, :string t.column :remember_token_expires_at, :datetime end end def self.down drop_table "users" end end On Jul 18, 2:58 am, Jodi Showers <j...-BOB1p6JRLoAV+D8aMU/kSg@public.gmane.org> wrote:> On 17-Jul-07, at 9:48 PM, Mister Yu wrote: > > > > > Hi, > > > I successfully installed AAA couple days before, and i managed to > > register a uer with it, with no user activation. > > > but for some strange reason, it stops working for the signup method, > > with i go to the signup page, press submit, it shows an error page, > > what''s wrong? here''s the error page. > > > undefined method `activation_code'' for #<User:0x3b6dbd > > Looks like you didn''t run the required migration - or backed it out. > > AAA requires a few fields - the error above means it''s looking for > one that isn''t there. > > Jodi--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am not sure why this happens, I had the same problem. Simple fix is to make a new migration: call it add_activation_code and put the following in it. class AddActivationCode < ActiveRecord::Migration def self.up add_column :users, :activation_code, :string end def self.down remove_column :users, :activation_code end end Then migrate and you should be OK Regards Mikel http://www.blognow.com.au/q On Jul 18, 8:17 pm, Mister Yu <eryan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Jodi, > > Thanks for the reply. I thought of that as well, but when i look at > the Database Migrations->migrate->006_create_users.rb, that field > isn''t there. > > did i skip some steps when i installed it? but it worked for me > before. > > here is the file: > > class CreateUsers < ActiveRecord::Migration > def self.up > create_table "users", :force => true do |t| > t.column :login, :string > t.column :email, :string > t.column :crypted_password, :string, :limit => 40 > t.column :salt, :string, :limit => 40 > t.column :created_at, :datetime > t.column :updated_at, :datetime > t.column :remember_token, :string > t.column :remember_token_expires_at, :datetime > end > end > > def self.down > drop_table "users" > end > end > > On Jul 18, 2:58 am, Jodi Showers <j...-BOB1p6JRLoAV+D8aMU/kSg@public.gmane.org> wrote: > > > On 17-Jul-07, at 9:48 PM, Mister Yu wrote: > > > > Hi, > > > > I successfully installed AAA couple days before, and i managed to > > > register a uer with it, with no user activation. > > > > but for some strange reason, it stops working for the signup method, > > > with i go to the signup page, press submit, it shows an error page, > > > what''s wrong? here''s the error page. > > > > undefined method `activation_code'' for #<User:0x3b6dbd > > > Looks like you didn''t run the required migration - or backed it out. > > > AAA requires a few fields - the error above means it''s looking for > > one that isn''t there. > > > Jodi--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---