【发布时间】:2020-11-12 08:46:36
【问题描述】:
资产预编译失败。我试过了
$ RAILS_ENV=production bundle exec rake assets:precompile
它仍然无法正常工作。
这就是我得到的
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 80f7792c62f7678693d5b0a156516502662ee0ef
remote: !
remote: ! We have detected that you have triggered a build from source code with version 80f7792c62f7678693d5b0a156516502662ee0ef
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to online-edukation.
remote:
To https://git.heroku.com/online-edukation.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/online-edukation.git'
请问是什么原因?
【问题讨论】:
-
要检查的几件事 - 确保你在
master分支上,并确保你首先完成了git pull -
好的,谢谢。似乎事实并非如此。
ModuleNotFoundError: Module not found: Error: Can't resolve 'stylesheets/application.scss' in '/tmp/build_35bb4e62/app/javascript/packs'这是错误 -
尝试
git pushheroku master -f强制推送
标签: ruby-on-rails ruby-on-rails-6