我正在關注Michael Hartl的教程。在第7章中,我能夠部署到Heroku。 Heroku版本功能正常,但似乎缺少一些樣式表信息。Michael Hartl的Rails教程在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>
OK ......你是否也有問題要一起去的代碼,牆? – PeeHaa
這不是如何工作,你應該指定的問題 – rajeemcariazo