Ruby on rails 推送到Heroku时Rails应用程序预编译资产失败错误

Ruby on rails 推送到Heroku时Rails应用程序预编译资产失败错误,ruby-on-rails,heroku,Ruby On Rails,Heroku,在将其标记为重复之前——我已经看到了其他具有相同问题的线程,解决方案总是包括 “config.assets.initialize\u on\u precompile=false” 我已经这样做了,但是错误仍然存在。这是我的application.rb文件: require_relative 'boot' require 'rails/all' Bundler.require(*Rails.groups) module SampleApp class Application <

在将其标记为重复之前——我已经看到了其他具有相同问题的线程,解决方案总是包括 “config.assets.initialize\u on\u precompile=false” 我已经这样做了,但是错误仍然存在。这是我的application.rb文件:

require_relative 'boot'

require 'rails/all'

Bundler.require(*Rails.groups)

module SampleApp
   class Application < Rails::Application

   config.load_defaults 5.2

   config.assets.initialize_on_precompile = false

  end
end

尝试
$rake资产:预编译

希望这能解决你的问题

这不是全部错误。你删除了原因,所以请添加你在推到Heroku.to时看到的全部错误![remote rejected]master->master(接收前钩子已拒绝)错误:无法将某些引用推送到“”这就是您要查找的内容吗?不,他只是希望将整个错误输出放在那里。输出中有有用的信息。在您粘贴的代码段上方,会有一些错误指示,因此如果您可以编辑问题并粘贴您在尝试部署时获得的整个heroku输出。
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected