我添加了一個圖像到/應用/資產/ images文件夾,標誌-small.jpg圖像預編譯,Heroku的不斷有些
然後抱怨我加入這一行我的看法
= link_to image_tag('logo-small.jpg'), root_path, :class => 'brand'
然後我預編譯,
rake assets:precompile RAILS_ENV=production
git add,git commit和git push heroku master。推送作品。
我仍然得到錯誤
ActionView::Template::Error (logo-small.jpg isn't precompiled):
爲什麼呢?
編輯:我試過其他圖片,他們很好。 Heroku在徽標和徽標方面存在問題,但與其他圖片無關。 WTF?
你在heroku上運行什麼棧?新的Cedar堆棧應該自動預編譯您的資產。如果年齡較大,則可能需要在服務器上運行rake任務。 – jstim 2012-07-20 22:18:57
雪松。我在2天前打開了我的帳戶。 – wachichornia 2012-07-21 08:14:28
謝謝。你能像下面那樣在你的服務器上手動運行'assets:precompile'嗎? – jstim 2012-07-22 01:07:14