无法在Heroku上加载自定义CSS [英] Can't load custom CSS on Heroku

查看:133
本文介绍了无法在Heroku上加载自定义CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Rails 3.2.8,并构建了一个链接到自定义CSS文件和图像的应用程序。自定义CSS文件放置在我的Assets / stylesheets文件夹中,图像位于Assets / images中。

出于某种原因,当我将应用程序推送到Heroku时,CSS和图像无法加载。该应用程序生成一个包含所有图像和CSS文件的manifest.yml文件。

该CSS文件是Twitter Bootstrap的自定义版本: http://twitter.github.com/bootstrap/index.html



希望你们能够提前帮助并提前致谢!

解决方案

我不认为您可以将图像存储在heroku上。你将不得不使用amazone s3桶等东西。然后将ccs图片链接到amazone存储区


I am running Rails 3.2.8 and built an app which links to a custom CSS file and images. The custom CSS file is placed in my Assets/stylesheets folder and images are in Assets/images.

For some reason, the CSS and images don't load when I push the app to Heroku. The app generates a manifest.yml file which contains all the images and CSS file.

The CSS file is a customised version of Twitter Bootstrap: http://twitter.github.com/bootstrap/index.html

Hope you guys can help and thanks in advance!

解决方案

I don't think you can store images on heroku. You'll have to use something like amazone s3 bucket. And then link the ccs images to the amazone bucket

这篇关于无法在Heroku上加载自定义CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆