解決了部署到Heroku時無法顯示bootstrap CSS樣式的問題

來源:互聯網
上載者:User

標籤:style   blog   http   io   使用   sp   檔案   div   on   

今天使用了bootstrap-sass進行布局,真的很好用,據說是tweet 開源的一個東東,本地一切都OK的時候歡喜的git push heroku後,發現bootstrap css的樣式並沒有預期中的顯示出來,感覺還是挺沮喪,但是有問題就要解決,於是抱著技術問題問Google的態度,搜尋了下,在 stackoverflow上找到瞭解決方法,不得不說stackoverflow真是個好東西,我的問題大部分都是在那上面解決的。

原文:

 

I could not view the site with bootstrap CSS on Heroku so I did the following change on config/environments/production.rb, change the line:

(翻譯:我不能在heroku部署的應用上上看到bootstrap的css樣式,所以我在config/environments/production.rb這個檔案做了如下改動)

 

config.assets.compile = false

 To:

config.assets.compile = true

哈哈,問題就解決了!多謝多謝!!!!!!IT WORKS!

 

解決了部署到Heroku時無法顯示bootstrap CSS樣式的問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.