herokuへデプロイする際に、Precompiling assets failed.エラーが出たため、解決策を調べ、config.assets.initialize_on_precompile = false
を書くといいということを見つけたはいいのですが…。
config.assets.initialize_on_precompile = false
を書く場所は以下で合っていますでしょうか??
moduleの中に最初は書きましたが、そうすると依然として同様のエラーが出続けていたため、
module の外に書かなきゃいけないんだなと思い込んでいましたが、もしかして間違っていますか?
config\application.rb
require_relative 'boot' require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) config.assets.initialize_on_precompile = false module Aptnote class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 5.2 # config.assets.initialize_on_precompile = false # => Precompiling assets failed. # Settings in config/environments/* take precedence over those specified here. # Application configuration can go into files in config/initializers # -- all .rb files in that directory are automatically loaded after loading # the framework and any gems in your application. end end
こちらの問題からの延長線上になります。
Ruby on Rails - Rails 5アプリをherokuにデプロイしようとするとCould not detect rake tasksエラーが出る(140126)|teratail
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。