# 앱 재빌드 시 이메일 확인 플러그인에서 db.rake 실패

**URL:** <https://meta.discourse.org/t/db-rake-fails-for-my-email-check-plugin-on-rebuilding-app/162603>\
**Category:** Product Support\
**Created:** [8월 31, 2020, 9:14오후 UTC](https://meta.discourse.org/t/db-rake-fails-for-my-email-check-plugin-on-rebuilding-app/162603 "2020-08-31T21:14:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Terrapop](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@Terrapop](https://meta.discourse.org/u/Terrapop)\
**Post date:** [8월 31, 2020, 9:14오후 UTC](https://meta.discourse.org/t/db-rake-fails-for-my-email-check-plugin-on-rebuilding-app/162603/1 "2020-08-31T21:14:57Z")

</div>

가입 시 외부 API를 통해 일회용 이메일을 확인하는 첫 번째 플러그인을 개발했습니다.

현재까지는 의도한 대로 작동하고 있습니다…

> **[GitHub - disclosetv/plugin-check-email: Check for disposable email](https://github.com/disclosetv/plugin-check-email)**
>
> Check for disposable email

하지만 이제 앱을 다시 빌드하거나 업그레이드할 때 db.rake에 어떤 문제가 있는 것 같습니다:

```
rails aborted!
ActiveRecord::RecordInvalid: Validation failed: Email is not allowed from that email provider. Please use another email address.
(eval):39:in `block (2 levels) in run_file'
/src/lib/tasks/db.rake:222:in `block in <main>'
bin/rails:17:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

```

아마도 이 db.rake의 SeedFu.seed(SeedHelper.paths, SeedHelper.filter) 줄에서 데이터를 시드(seed)하려고 하지만, 제 플러그인이 잘못된 이메일을 검사하여 방해하기 때문인 것 같습니다.

하지만 같은 파일에서 플러그인이 실행될 시드 데이터 파일에서 제외될 수 있다는 것을 발견했습니다:

```
  def self.filter
    # Allows a plugin to exclude any specified seed data files from running
    DiscoursePluginRegistry.seedfu_filter.any? ?
      /^(?!.*(#{DiscoursePluginRegistry.seedfu_filter.to_a.join("|")})).*$/ : nil
  end
end

```

그렇다면 어떻게 해야 하나요? 그렇게 하는 플러그인의 예시가 있을까요? 아니면 이 단계를 넘어가기 위해 다른 조치를 취해야 하나요? 사전에 도움을 주시면 감사하겠습니다.

---

_[View the full topic](https://meta.discourse.org/t/db-rake-fails-for-my-email-check-plugin-on-rebuilding-app/162603)._
