我正在关注 Michael Hartl 的教程。在第 7 章中,我能够部署到 Heroku,但是。Heroku 版本运行正常,但似乎缺少一些样式表信息。
让我重新表述我的问题:在 Heroku 上查看时,网站的格式不正确,好像 css 被禁用一样。
in Heroku:
==========
<!DOCTYPE html>
<html>
<head>
<title> Ruby on Rails Tutorial Sample App</title>
<link href="/assets/application-7270767b2a9e9fff880aa5de378ca791.css" media="all" rel="stylesheet" type="text/css" />
<script src="/assets/application-3428e82709d7645135002c8fadfafdc6.js" type="text/javascript"></script>
<meta content="authenticity_token" name="csrf-param" />
<meta content="L4TMpZr2j2TAf1jrSThKE48aaP1P+NuVfwSXEVLheEE=" name="csrf-token" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
On the local server:
====================
<!DOCTYPE html>
<html>
<head>
<title> Ruby on Rails Tutorial Sample App</title>
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/custom.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/static_pages.css?body=1" media="all" rel="stylesheet" type="text/css" />
<link href="/assets/users.css?body=1" media="all" rel="stylesheet" type="text/css" />
<script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/static_pages.js?body=1" type="text/javascript"></script>
<script src="/assets/users.js?body=1" type="text/javascript"></script>
<script src="/assets/application.js?body=1" type="text/javascript"></script>
<meta content="authenticity_token" name="csrf-param" />
<meta content="pF9wfBsOh4j+WMjnd/sbfq+sIPxNBhiNI6lYXUycMjo=" name="csrf-token" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>