チュートリアルの3章のテストの部分です。
rails testコマンドを実行しても、テストの結果どころか実行されません。
[rails test実行結果]
ec2-user:~/environment/sample_app (static-pages) $ rails test /home/ec2-user/.rvm/gems/ruby-2.6.3/gems/activerecord-5.1.6/lib/active_record/connection_adapters/connection_specification.rb:246:in `resolve_symbol_connection': 'test' database is not configured. Available: ["development", "pool", "timeout", "database"] (ActiveRecord::AdapterNotSpecified) from /home/ec2-user/.rvm/gems/ruby-2.6.3/gems/activerecord-5.1.6/lib/active_record/connection_adapters/connection_specification.rb:227:in `resolve_connection' from /home/ec2-user/.rvm/gems/ruby-2.6.3/gems/activerecord-5.1.6/lib/active_record/connection_adapters/connection_specification.rb:141:in `resolve'
datacase.ymlの部分だとは思うんですが、どう変更していいか分かりません。どうかよろしくお願い致します。
default: &default # adapter: sqlite3 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 5000 development: <<: *default adapter: sqlite3 database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: <<: *default database: db/test.sqlite3 production: <<: *default database: db/production.sqlite3
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。