簡體   English   中英

Ruby on Rails預編譯資產失敗

[英]Ruby on Rails Precompiling assets failed

我一直在關注reInteractive ruby​​ on rails(15分鍾博客),並且在文章結尾(第二部分)中,使用heroku上傳文件時出現錯誤:

! Precompiling assests failed

!Push rejected, failed to compile Ruby app

To git@heroku.com:peaceful-sea-8032.git
! [remote rejected] master -> master <pre-receive hook declined>
error: failed to push some refs to 'git@heroku.com:peaceful-sea-8032.git'

ps:該應用程序可以在localhost上正常運行,我看到了類似的問題,但是嘗試他們的解決方案沒有成功。

在本地預編譯資產。 在shell cd中,找到您的應用程序文件夾,然后輸入:

RAILS_ENV=production bundle exec rake assets:precompile

這將在本地預編譯您的資產,然后您必須

git add .
git commit -am 'precompiled assets'
git push heroku

(編輯的最后一行)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM