###前提・実現したいこと
rails tutorialの4版における10.2.3を進めていたところ、最後のテストでエラーが発生してしまいました。
###発生している問題・エラーメッセージ
# Running: EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE Finished in 1.885435s, 19.0937 runs/s, 0.0000 assertions/s. 1) Error: UsersSignupTest#test_invalid_signup_infomation: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersSignupTest#test_invalid_signup_infomation: NoMethodError: undefined method `each' for nil:NilClass 2) Error: UsersSignupTest#test_valid_signup_information_with_account_activation: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersSignupTest#test_valid_signup_information_with_account_activation: NoMethodError: undefined method `each' for nil:NilClass 3) Error: StaticPagesControllerTest#test_should_get_contact: ActiveRecord::StatementInvalid: Could not find table 'users' Error: StaticPagesControllerTest#test_should_get_contact: NoMethodError: undefined method `each' for nil:NilClass 4) Error: StaticPagesControllerTest#test_should_get_help: ActiveRecord::StatementInvalid: Could not find table 'users' Error: StaticPagesControllerTest#test_should_get_help: NoMethodError: undefined method `each' for nil:NilClass 5) Error: StaticPagesControllerTest#test_should_get_home: ActiveRecord::StatementInvalid: Could not find table 'users' Error: StaticPagesControllerTest#test_should_get_home: NoMethodError: undefined method `each' for nil:NilClass 6) Error: StaticPagesControllerTest#test_should_get_about: ActiveRecord::StatementInvalid: Could not find table 'users' Error: StaticPagesControllerTest#test_should_get_about: NoMethodError: undefined method `each' for nil:NilClass 7) Error: UsersEditTest#test_unsuccessful_edit: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersEditTest#test_unsuccessful_edit: NoMethodError: undefined method `each' for nil:NilClass 8) Error: UsersEditTest#test_successful_edit_with_friendly_forwarding: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersEditTest#test_successful_edit_with_friendly_forwarding: NoMethodError: undefined method `each' for nil:NilClass 9) Error: UsersControllerTest#test_should_redirect_destroy_when_not_logged_in: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersControllerTest#test_should_redirect_destroy_when_not_logged_in: NoMethodError: undefined method `each' for nil:NilClass 10) Error: UsersControllerTest#test_should_redirect_index_when_not_logged_in: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersControllerTest#test_should_redirect_index_when_not_logged_in: NoMethodError: undefined method `each' for nil:NilClass 11) Error: UsersControllerTest#test_should_redirect_edit_when_not_logged_in: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersControllerTest#test_should_redirect_edit_when_not_logged_in: NoMethodError: undefined method `each' for nil:NilClass 12) Error: UsersControllerTest#test_should_redirect_update_when_not_logged_in: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersControllerTest#test_should_redirect_update_when_not_logged_in: NoMethodError: undefined method `each' for nil:NilClass 13) Error: UsersControllerTest#test_should_get_new: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersControllerTest#test_should_get_new: NoMethodError: undefined method `each' for nil:NilClass 14) Error: UsersControllerTest#test_should_redirect_update_when_logged_in_as_wrong_user: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersControllerTest#test_should_redirect_update_when_logged_in_as_wrong_user: NoMethodError: undefined method `each' for nil:NilClass 15) Error: UsersControllerTest#test_should_redirect_destroy_when_logged_in_as_a_non-admin: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersControllerTest#test_should_redirect_destroy_when_logged_in_as_a_non-admin: NoMethodError: undefined method `each' for nil:NilClass 16) Error: UsersControllerTest#test_should_redirect_edit_when_logged_in_as_wrong_user: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersControllerTest#test_should_redirect_edit_when_logged_in_as_wrong_user: NoMethodError: undefined method `each' for nil:NilClass 17) Error: UserMailerTest#test_account_activation: ActiveRecord::StatementInvalid: Could not find table 'users' 18) Error: UserMailerTest#test_password_reset: ActiveRecord::StatementInvalid: Could not find table 'users' 19) Error: SessionsHelperTest#test_current_user_returns_nil_remember_digest_is_wrong: ActiveRecord::StatementInvalid: Could not find table 'users' Error: SessionsHelperTest#test_current_user_returns_nil_remember_digest_is_wrong: NoMethodError: undefined method `each' for nil:NilClass 20) Error: SessionsHelperTest#test_current_user_returns_right_user_when_session_is_nil: ActiveRecord::StatementInvalid: Could not find table 'users' Error: SessionsHelperTest#test_current_user_returns_right_user_when_session_is_nil: NoMethodError: undefined method `each' for nil:NilClass 21) Error: UsersIndexTest#test_index_as_admin_including_pagination_and_delete_links: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersIndexTest#test_index_as_admin_including_pagination_and_delete_links: NoMethodError: undefined method `each' for nil:NilClass 22) Error: UsersIndexTest#test_index_as_non-admin: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersIndexTest#test_index_as_non-admin: NoMethodError: undefined method `each' for nil:NilClass 23) Error: SessionsControllerTest#test_should_get_new: ActiveRecord::StatementInvalid: Could not find table 'users' Error: SessionsControllerTest#test_should_get_new: NoMethodError: undefined method `each' for nil:NilClass 24) Error: UserTest#test_name_should_not_be_too_long: ActiveRecord::StatementInvalid: Could not find table 'users' 25) Error: UserTest#test_email_addresses_should_be_unique: ActiveRecord::StatementInvalid: Could not find table 'users' 26) Error: UserTest#test_email_should_not_be_too_long: ActiveRecord::StatementInvalid: Could not find table 'users' 27) Error: UserTest#test_should_be_valid: ActiveRecord::StatementInvalid: Could not find table 'users' 28) Error: UserTest#test_authenticated?_should_return_false_for_a_user_with_nil_digest: ActiveRecord::StatementInvalid: Could not find table 'users' 29) Error: UserTest#test_email_validation_should_reject_invalid_addresses: ActiveRecord::StatementInvalid: Could not find table 'users' 30) Error: UserTest#test_name_should_be_present: ActiveRecord::StatementInvalid: Could not find table 'users' 31) Error: UserTest#test_email_should_be_present: ActiveRecord::StatementInvalid: Could not find table 'users' 32) Error: SiteLayoutTest#test_layout_links: ActiveRecord::StatementInvalid: Could not find table 'users' Error: SiteLayoutTest#test_layout_links: NoMethodError: undefined method `each' for nil:NilClass 33) Error: UsersLoginTest#test_login_with_remembering: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersLoginTest#test_login_with_remembering: NoMethodError: undefined method `each' for nil:NilClass 34) Error: UsersLoginTest#test_login_with_valid_information_followed_by_logout: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersLoginTest#test_login_with_valid_information_followed_by_logout: NoMethodError: undefined method `each' for nil:NilClass 35) Error: UsersLoginTest#test_login_without_remembering: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersLoginTest#test_login_without_remembering: NoMethodError: undefined method `each' for nil:NilClass 36) Error: UsersLoginTest#test_login_with_invalid_information: ActiveRecord::StatementInvalid: Could not find table 'users' Error: UsersLoginTest#test_login_with_invalid_information: NoMethodError: undefined method `each' for nil:NilClass 36 runs, 0 assertions, 0 failures, 36 errors, 0 skips
###エラーに対して行ったこと
エラー文には、ActiveRecord::StatementInvalidとあったので、rails cでActiveRecordを確認したのですが、Usersはありました。また、本番用のテーブルがなのかと思い、本番用にマイグレーションも行ったのですが、エラー文は消えませんでした。
bundle exec rake RAILS_ENV=production db:migrate
どなたかお分かりになる方いましたら御回答の方宜しくお願い致します。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。