codetriage / docs_doctor

http://docsdoctor.org
27 stars 21 forks source link

Unable to delete account #46

Open jakegavin opened 8 years ago

jakegavin commented 8 years ago

I tried to delete my account (I think the project idea is great but I'm trying to cut down on the number of emails I'm receiving :confused: ) but get the "We're sorry, but something went wrong" error page when I click the delete button on my account.

I was hoping to sort it out myself and open a PR but I wasn't able to reproduce the error locally. Everything seemed to work fine locally.

I'd be happy to help out and try to fix the bug if I can but I need a little more info. Are you able to see what the error is in the production logs?

schneems commented 8 years ago

I have no idea why. I don't have a log collection addon specified for docsdoctor.org. Sorry for the problem . I manually deleted your account. Thanks for trying it out :rocket:

schneems commented 8 years ago

Strike that, found the bug

irb(main):005:0> User.where(github: "jakegavin").first.destroy
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/has_many_association.rb:74: warning: circular argument reference - reflection
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/has_many_association.rb:78: warning: circular argument reference - reflection
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/has_many_association.rb:82: warning: circular argument reference - reflection
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/has_many_association.rb:101: warning: circular argument reference - reflection
NoMethodError: undefined method `name' for nil:NilClass
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/has_many_association.rb:79:in `cached_counter_attribute_name'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/has_many_association.rb:102:in `inverse_updates_counter_cache?'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/has_many_association.rb:112:in `delete_records'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/collection_association.rb:492:in `remove_records'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/collection_association.rb:485:in `block in delete_or_destroy'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/collection_association.rb:168:in `block in transaction'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `transaction'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:208:in `transaction'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/collection_association.rb:167:in `transaction'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/collection_association.rb:485:in `delete_or_destroy'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/collection_association.rb:270:in `destroy'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/collection_association.rb:208:in `destroy_all'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/has_many_association.rb:26:in `handle_dependency'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/associations/builder/association.rb:135:in `block in add_before_destroy_callbacks'
    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.1.1/lib/active_support/callbacks.rb:440:in `instance_exec'
    from /app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.1.1/lib/active_support/callbacks.rb:440:in `block in make_lambda'
... 3 levels...
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:263:in `block in destroy'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `block in transaction'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:219:in `within_new_transaction'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:208:in `transaction'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
    from /app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.1.1/lib/active_record/transactions.rb:263:in `destroy'
    from (irb):5
    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.1/lib/rails/commands/console.rb:90:in `start'
    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.1/lib/rails/commands/console.rb:9:in `start'
    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:69:in `console'
    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /app/vendor/bundle/ruby/2.3.0/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
    from /app/bin/rails:4:in `require'
    from /app/bin/rails:4:in `<main>'irb(main):006:0>
schneems commented 8 years ago

Ugh, I can't get to this quickly. I updated your email so you shouldn't get anything emailed to you.