@gafueru (空斗 鮎坂)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

ユーザーの新規登録の画面に遷移できない

解決したいこと

Mysql2::Error: Table 'sharegame_development.application_records' doesn't existというエラーが出ている

例)
アプリ作成中で新規登録の画面を作っているときに新規登録のボタンを押したらエラーが出る。新規登録の画面に遷移しない

発生している問題・エラー

出ているエラーメッセージを入力


例)ActiveRecord::StatementInvalid in Devise::RegistrationsController#new
Mysql2::Error: Table 'sharegame_development.application_records' doesn't exist


該当するソースコード


<%= form_with model: @user, url: user_registration_path, local: true do |f| %>
  <%= render "devise/shared/error_messages", resource: resource %>

  <div class="field">
    <%= f.label :name, "ユーザー名" %><br />
    <%= f.text_field :name, id:"user_name" %>
  </div>
  
  <div class="field">
    <%= f.label :email %><br />
    <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
  </div>

  <div class="field">
    <%= f.label :password %>
    <% if @minimum_password_length %>
    <em>(<%= @minimum_password_length %> characters minimum)</em>
    <% end %><br />
    <%= f.password_field :password, autocomplete: "new-password" %>
  </div>

  <div class="field">
    <%= f.label :password_confirmation %><br />
    <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
  </div>

  <div class="actions">
    <%= f.submit "Sign up" %>
  </div>
<% end %>

<%= render "devise/shared/links" %>

### 自分で試したこと
ここに問題・エラーに対して試したことを記載してください。
データベースを作り直すためにrails db:reset、rails db:create、rails db:migrateを行った
データテーブルにはsharegame_development.application_recordsこのようなものは作った覚えもないし、必要ではないと思う
0 likes

No Answers yet.

Your answer might help someone💌