在将其标记为重复之前-我已经看到其他线程具有相同的问题,并且解决方案始终包括 “ config.assets.initialize_on_precompile =假” 到我的config / application.rb配置文件,我已经完成了,但是错误仍然存在。这是我的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
这是我运行$ git push heroku master时的完整错误消息:
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
答案 0 :(得分:0)
尝试<script>
function loadDoc() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("demo").innerHTML = this.responseText;
}
};
xhttp.open("GET", "articles.xml", true);
xhttp.send();
</script>
希望这能解决您的问题!