已关闭,此问题需要details or clarity。目前不接受答复。
**想改善这个问题吗?**通过editing this post添加详细信息并澄清问题。
3天前关闭。
Improve this question
rails db:seed
rails aborted!
ActiveRecord::RecordNotUnique: SQLite3::ConstraintException: UNIQUE constraint failed: index 'index_users_on_confirmation_token'
C:/Users/belli/OneDrive/CAMBRIDGE/technical_test2/money_transfer/db/seeds.rb:12:in `block in <main>'
C:/Users/belli/OneDrive/CAMBRIDGE/technical_test2/money_transfer/db/seeds.rb:11:in `times'
C:/Users/belli/OneDrive/CAMBRIDGE/technical_test2/money_transfer/db/seeds.rb:11:in `<main>'
Caused by:
SQLite3::ConstraintException: UNIQUE constraint failed: index 'index_users_on_confirmation_token'
C:/Users/belli/OneDrive/CAMBRIDGE/technical_test2/money_transfer/db/seeds.rb:12:in `block in <main>'
C:/Users/belli/OneDrive/CAMBRIDGE/technical_test2/money_transfer/db/seeds.rb:11:in `times'
C:/Users/belli/OneDrive/CAMBRIDGE/technical_test2/money_transfer/db/seeds.rb:11:in `<main>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
尝试查看我的数据库并得到错误
1条答案
按热度按时间wfauudbj1#
这条线
表示您的
seeds.rb
正在为多个用户生成相同的confirmation_token
。