エラー文にapplication.rb:5:in <top (required)>
とあることから5行目にconfig.time_zone = "Tokyo"
を書いたと見受けられます。
以下はRails 5.2.3で書いたものです。class Application
内に書くとエラーが出なくなると思いますよ。
application.rb
1require_relative 'boot'
2
3require 'rails/all'
4
5# Require the gems listed in Gemfile, including any gems
6# you've limited to :test, :development, or :production.
7Bundler.require(*Rails.groups)
8
9module Teratail
10 class Application < Rails::Application
11 # Initialize configuration defaults for originally generated Rails version.
12 config.load_defaults 5.2
13
14 # Settings in config/environments/* take precedence over those specified here.
15 # Application configuration can go into files in config/initializers
16 # -- all .rb files in that directory are automatically loaded after loading
17 # the framework and any gems in your application.
18
19 # ここに書く
20 config.time_zone = "Tokyo"
21 config.active_record.default_timezone = :local
22 end
23end
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/06/02 12:06