我刚刚创建了一个具有特定CSS样式的个人网站。网上的消息来源说在部署之前预先编译我的资产,在遵循这些指示之后我的heroku应用程序仍然没有正确格式化。
任何见解?
我的gemfile看起来像这样:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'
# Use sqlite3 as the database for Active Record
gem 'pg'
gem 'rails_12factor'
group :development, :test do
gem 'sqlite3'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
gem 'jquery-rails'
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jquery-turbolinks'
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'json'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
和我的database.yml文件:
default: &default
adapter: postgresql
pool: 5
timeout: 5000
development:
<<: *default
database: db/development
test:
<<: *default
database: db/test
production:
<<: *default
database: db/production
由于
编辑:
由于'格式不正确',我的意思是我的风格不存在。
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*/
html, body{
background:#eeecec;
background-image:url("clown_station.png");
background-size:cover;
text-align:none;
}
h1{
font-family:'Helvetica';
font-weight:bold;
color:black;
}
.kowabunga_logo{
position:absolute;
left:200px;
}
.site-container {
background-color:#ffffff;
border-right:0;
border-bottom:0;
top:0;
display:block;
overflow:auto;
background:rgba(255,255,255,0.7);
width:84%;
}
.site-container{
position:absolute;
top:185px;
right:97px;
width:85%;
height:75%;
box-shadow:0 2px 2px 1px rgba(64,64,65,.11)
}
.kowabunga_bar{
height:30px;
background-color:#3f3f3f;
z-index:-1;
font-family:'Indie Flower', cursive;
}
.kowabunga_bar p{
float:left;
margin-left:5px;
margin-top:5px;
}
.kowabunga_bar img{
z-index:100; /*position: relative;*/
position:inline;
float:right;
margin-right:5px;
margin-top:2px;
}
.kowabunga_bar #contact{
z-index:100;
position:inline;
float:right;
margin-right:10px;
margin-top:5px;
}
#tweet_pic {
z-index:100;
position:inline;
float:right;
margin-right:2px;
margin-top:2px;
margin-left:920px;
}
#tweet{
z-index:100;
position:inline;
float:right;
}
#navigation{
position:absolute;
top:195px;
left:97px;
}
ul#navigation {
padding:0;
z-index:1;
}
ul#navigation li {
display:inline;
}
ul#navigation li a {
background-color:black;
color:white;
padding:10px 20px;
text-decoration:none;
}
ul#navigation li a:hover {
color:#5ac9de;
}
#list_item img{
display:block;
height:90px;
width:148px;
}
#list_title{
border-bottom:1px solid gray;
}
.social_media{
margin-left:1050px;
margin-top:0px;
border-top-width:50px;
padding-top:4px;
}
#neon_cover{
position: absolute;
right: 1px;
bottom: 300px;
}