【问题标题】:How add correct stylesheets file on heroku?如何在heroku上添加正确的样式表文件?
【发布时间】:2014-08-19 00:48:47
【问题描述】:

我在 heroku.com 上卸载了我的应用程序 - 并成功卸载。但是我添加了样式表,并完成了任何命令,例如 git add . git commit -m 'add'git push heroku master 我遇到了一些问题。首先,我将名称从 application.css 更改为 application.scss.erb。但是又出现了一些问题。图片包含在 app/assets/images 中

ark@ark-Aspire-5750G:~/appq$ git push heroku master
Fetching repository, done.
Counting objects: 65, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (57/57), 101.79 KiB, done.
Total 57 (delta 28), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.6.3
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Using rake 10.3.2
       Using minitest 5.3.5
       Using thread_safe 0.3.4
       Using builder 3.2.2
       Using erubis 2.7.0
       Using rack 1.5.2
       Using i18n 0.6.9
       Using mime-types 1.25.1
       Using polyglot 0.3.5
       Using arel 5.0.1.20140414130214
       Using coffee-script-source 1.7.0
       Using execjs 2.2.1
       Using thor 0.19.1
       Using hike 1.2.3
       Using multi_json 1.10.1
       Using pg 0.17.1
       Using bundler 1.6.3
       Using tilt 1.4.1
       Using rails_stdout_logging 0.0.3
       Using json 1.8.1
       Using sass 3.2.19
       Using tzinfo 1.2.1
       Using rails_serve_static_assets 0.0.2
       Using treetop 1.4.15
       Using rack-test 0.6.2
       Using coffee-script 2.2.0
       Using sprockets 2.11.0
       Using rails_12factor 0.0.2
       Using rdoc 4.1.1
       Using uglifier 2.5.1
       Using activesupport 4.1.1
       Using actionview 4.1.1
       Using mail 2.5.4
       Using actionpack 4.1.1
       Using activemodel 4.1.1
       Using jbuilder 2.1.1
       Using sdoc 0.4.0
       Using actionmailer 4.1.1
       Using railties 4.1.1
       Using sprockets-rails 2.1.3
       Using activerecord 4.1.1
       Using coffee-rails 4.0.1
       Using jquery-rails 3.1.1
       Using sass-rails 4.0.3
       Using rails 4.1.1
       Using turbolinks 2.2.2
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Bundle completed (1.15s)
       Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       I, [2014-06-27T19:38:47.194880 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/avator-8417efe1732a1240e96ca4537ddff902.png
       I, [2014-06-27T19:38:47.196966 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/chart1-d20da096a52b8f67a4bc1ba5d4aa8f9c.png
       I, [2014-06-27T19:38:47.198911 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/chart2-c80702d32a0dec4d6c4734d4e6f59423.png
       I, [2014-06-27T19:38:47.200752 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/rails (другая копия)-34f56ba8d936fb280749fc72dc5e65b0.png
       I, [2014-06-27T19:38:47.202422 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/rails (копия)-34f56ba8d936fb280749fc72dc5e65b0.png
       I, [2014-06-27T19:38:47.204308 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/rails-34f56ba8d936fb280749fc72dc5e65b0.png
       I, [2014-06-27T19:38:47.206274 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_body-6837be0a2d5e5de15c109dc58d61247a.jpg
       I, [2014-06-27T19:38:47.208235 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_button-4a57228153ebb98dc793fd35197329cd.png
       I, [2014-06-27T19:38:47.209981 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_button_hover-8a8eee02e3cf18335c8618406f4911ac.png
       I, [2014-06-27T19:38:47.211660 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_comment-2b695c6a958fee2be7986f03db6e404d.png
       I, [2014-06-27T19:38:47.213819 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_featured_project-70897516972dd1e34d0f37a6397b61cd.png
       I, [2014-06-27T19:38:47.215771 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_featured_project_01-a579b74299cdaac7ecef96fd66c315a6.jpg
       I, [2014-06-27T19:38:47.217726 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_footer-f37a0c82e91139e78ca9c28e2df96c6b.png
       I, [2014-06-27T19:38:47.219738 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_header-90837c0eac4e3fe26328c4d0973759f1.png
       I, [2014-06-27T19:38:47.221516 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_image_01-8952f44f70f51d2bdbd1d62f6c11500a.jpg
       I, [2014-06-27T19:38:47.223261 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_image_02-f102841f2b62c6c8850ecf5f26ee9c2b.jpg
       I, [2014-06-27T19:38:47.225076 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_list-115c5c76c19597f44465749333df442e.png
       I, [2014-06-27T19:38:47.227082 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_menu-6378729d14122a4e8efbb63b144e0e96.png
       I, [2014-06-27T19:38:47.229039 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_menu_hover-8b683e0697358f16a4183db29dec2d95.png
       I, [2014-06-27T19:38:47.230827 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_post_bottom-b6b97935f9e5cf5e9a3db2fc0ac4e9a5.png
       I, [2014-06-27T19:38:47.232589 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_rss-66031ff333b20192724f3407be964e9c.png
       I, [2014-06-27T19:38:47.234406 #720]  INFO -- : Writing /tmp/build_a1269278-1141-499d-a732-aced45457a52/public/assets/templatemo_wrapper-3708945d2fa61cc622dc666e8d738799.png
       rake aborted!
       Sprockets::CircularDependencyError: /tmp/build_a1269278-1141-499d-a732-aced45457a52/app/assets/stylesheets/application.css has already been required
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:392:in `circular_call_protection'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:105:in `each'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:16:in `initialize'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `new'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `block in build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:395:in `circular_call_protection'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:105:in `each'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:16:in `initialize'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `new'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `block in build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:395:in `circular_call_protection'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:37:in `init_with'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/asset.rb:24:in `from_hash'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:54:in `cache_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:61:in `block (3 levels) in define'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
       /tmp/build_a1269278-1141-499d-a732-aced45457a52/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.1.3/lib/sprockets/rails/task.rb:60:in `block (2 levels) in define'
       Tasks: TOP => assets:precompile
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !

 !     Push rejected, failed to compile Ruby app

To git@heroku.com:mighty-oasis-6099.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:mighty-oasis-6099.git'

application.scss.css

.picture:rollover {
    backgound-image: image-url("chart1.png");
}

.picture:rollover:hover {
    backgound-image: url("chart2.png");
}

body {
    margin: 0px;
    padding: 0px;
    color: #666;
    font-family: Helevetica,Arial,sans-serif;
    font-size: 13px;
    line-height:1.5em;
    background-image: url("templatemo_body.jpg");
    background-repeat: repeat;
}

a, a:link, a:visited {
    color: #CC0000;
}

a:hover {
    color: #666666;
    text-decoration: none;
}

p { margin: 0px; padding: 0 0 10px 0; }
img { border: none; }

h1 { font-size: 40px; font-weight: bold; margin: 0 0 30px 0; padding: 5px 0; color: #000; }
h2 { font-size: 28px; font-weight: normal; line-height: 28px; margin: 0 0 30px 0; padding: 0; color: #c7a902; }
h3 { font-size: 21px; margin: 0 0 20px 0; padding: 0; padding: 0; color: #666666; }
h4 { font-size: 18px; margin: 0 0 20px 0; padding: 0; color: #ffa200; }
h5 { font-size: 16px; margin: 0 0 10px 0; padding: 0; color: #ffa200;}
h6 { font-size: 14px; margin: 0 0 5px 0; padding: 0; color: #ffa200;}

.cleaner { clear: both; width: 100%; height: 0px; font-size: 0px;  }
.cleaner_h10 { clear: both; width:100%; height: 10px; }
.cleaner_h20 { clear: both; width:100%; height: 20px; }
.cleaner_h30 { clear: both; width:100%; height: 30px; }
.cleaner_h40 { clear: both; width:100%; height: 40px; }
.cleaner_h50 { clear: both; width:100%; height: 50px; }
.cleaner_h60 { clear: both; width:100%; height: 60px; }

.margin_r30 { margin-right: 30px; }

.vertical_divider { border-right: 1px solid #d9d9d9; }
.horizon_divider {  border-bottom: 1px solid #d9d9d9; }

.float_l {
    float: left;
}

.float_r {
    float: right;
}

.image_wrapper {
    display: inline-block;
    padding: 8px;
    border: 1px solid #999;
    background: #ffffff;
    margin-bottom: 10px;
}
.fl_img {
    float: left;
    margin: 3px 30px 15px 0;
}
.fr_img {
    float: right;
    margin: 3px 0 15px 30px;
}

blockquote { font-style: italic; margin-left: 10px;}
cite { font-weight: bold; }
cite span { color: #8da332; }
em { color: #5d6d1e; }

.templatemo_list {
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.templatemo_list li {
    background: transparent url("templatemo_list.png") no-repeat scroll 0 0px;
    margin:0 0 20px;
    padding:0 0 0 25px;
    line-height: 1em;
}

.templatemo_list li a {
    color: #666;
    text-decoration: none;
}

.templatemo_list li a:hover {
    color: #000;
}

.button a {
    clear: both;
    display: block;
    width: 82px;
    height: 23px;
    padding: 3px 0 0 0;
    margin-top: 15px;
    background: url("templatemo_button.png") no-repeat;
    color: #000;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
}

.button a:hover {
    color: #fff;
    background: url("templatemo_button_hover.png") no-repeat;
}

#templatemo_wrapper {
    width: 970px;
    padding: 0;
    margin: 0 auto;
    background: url("templatemo_wrapper.png") repeat-y;
}

/* menu */

#templatemo_menu {
    width: 830px;
    height: 50px;
    margin: 0 10px 0 100px;
    padding: 20px 30px 0 0;
    background: url("templatemo_menu.png") top repeat-x;
}

#templatemo_menu ul {
    float: right;
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-block;
}

#templatemo_menu ul li {
    padding: 0px;
    margin: 0px;
    display: inline;
}

#templatemo_menu ul li a {
    float: left;
    display: block;
    width: 112px;
    height: 48px;
    padding: 0;
    margin: 0 5px 0 0 ;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    color: #e4decd;
    font-weight: bold;
    outline: none;
    border: none;
}

#templatemo_menu ul li a:hover, #templatemo_menu ul li .current {
    height: 38px;
    padding-top: 10px;
    color: #fff;
    background: url("templatemo_menu_hover.png") bottom no-repeat;
}

/* end of menu */

#templatemo_left_column {
    float: left;
    width: 400px;
}

#templatemo_right_column {
    float: right;
    width: 520px;
    margin-right: 10px;
}

#templatemo_header {
    width: 360px;
    height: 276px;
    padding: 0 10px;
    margin-left: 20px;
    background: url("templatemo_header.png") left center no-repeat;
}

#templatemo_header  #site_title {
    float: left;
    width: 310px;
    padding: 115px 0 0 60px;
}

#templatemo_header  #site_title h1 {
    margin: 0;
    padding: 0;
}

#templatemo_header  #site_title h1 a {
    margin: 0px;
    padding: 0px;
    font-size: 38px;
    color: #000;
    font-weight: normal;
    text-decoration: none;
}

#templatemo_header  #site_title h1 strong {
    color: #f00;
    font-family: Georgia, "Times New Roman", Times, serif;
}

#templatemo_header  #site_title a span {
    display: block;
    font-size: 16px;
    color: #666;
    font-weight: bold;
    letter-spacing: 2px;
    margin-left: 5px;
    margin-top: 20px;
}

#featured_project {
    float: right;
    width: 520px;
    height: 210px;
    padding: 33px 0;
    background: url("templatemo_featured_project.png") no-repeat;
}

#templatemo_sidebar {
    clear: both;
    float: left;
    width: 250px;
    margin-left: 130px;
}

#templatemo_main {
    float: right;
    width: 490px;
    padding-top: 40px;
    margin-right: 30px;
}

.post_section {
    clear: both;
    position: relative;
    padding: 0 60px 10px 0;
    margin: 40px 0;
    background: url("templatemo_post_bottom.png") bottom left no-repeat;
}

.post_section h2 {
    margin: 0;
    padding: 10px 0 10px 0;
    line-height: 30px;
}

.post_section p {
    text-align: justify;
    margin-bottom: 10px;
}

.post_section img {
    clear: both;
    display: block;
    margin: 20px 0;
}

.post_section .comment {
    position: absolute;
    top: -10px;
    right: 0px;
    width: 70px;
    height: 42px;
    text-align: center;
    padding-top: 10px;
    font-size: 16px;
    font-weight: bold;
    background: url("templatemo_comment.png") no-repeat;
}

.post_section .comment a {
    color: #333;
    text-decoration: none;
}

.post_section .comment_tab {
    padding: 10px 0;
    margin: 40px 0 20px 0;
    border-bottom: 1px dashed #666;
    font-size: 20px;
    font-weight: bold;
}

#templatemo_rss a {
    float: right;
    display: block;
    width: 190px;
    height: 40px;
    padding: 10px 0 10px 60px;
    margin-bottom: 30px;
    color: #ffa200;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    background: url("templatemo_rss.png") left center no-repeat;
}

#templatemo_header #templatemo_rss a:hover {
    color: #fff;
    text-decoration: none;
}

#templatemo_rss a span {
    font-size: 12px;
    margin-top: 5px;
    letter-spacing: 3px;
}

.comment_tab {
    padding: 10px 0;
    margin: 40px 0 40px 0;
    border-bottom: 1px dashed #666;
    font-size: 20px;
    font-weight: bold;
}

#comment_section {
    clear: both;
    margin-bottom: 60px;
    width: 460px;
}

.first_level {
    margin: 0; padding: 0;
}

.comments {
    list-style: none;
}

.comments li { margin-bottom: 10px; list-style:none; }
.comments li .commentbox1 { border: 1px solid #dddddd;  background: #eeeeee; }
.comments li .commentbox2 { border: 1px solid #dddddd;  background: #f6f6f6; }
.comments li .comment_box { clear: both; width:100%; padding: 15px;  }
.comment_box .gravatar { float: left; width: 50px; margin-right: 15px; background: #fff; }
.comment_box .gravatar img { margin: 0; width: 50px; height: 50px; }
.comment_box .comment_text { margin: 0 0 0 65px; }

.comment_box .comment_text p { margin: 0; }
.comment_text .comment_author { font-size: 14px; font-weight: bold; color: #781919; margin-bottom: 10px; }
.comment_text .date { font-size: 12px; font-weight: normal; color: #333; padding-left: 10px; }
.comment_text .time { font-size: 12px; font-weight: normal; color: #333; padding-left: 10px; }
.comment_text .reply a { display: block; clear: both; float: right; padding: 1px 10px; height: 24px; text-align: center; background: #3694ab; border: 1px solid #fff; color: #fff; }


#comment_form {
    clear: both;
}

#comment_form h3 {
    font-size: 20px;
    border-bottom: 1px dotted #666;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

#comment_form form {
    padding: 20px;
    background-color: #eeeeee;
    border: 1px solid #dddddd;
}

#comment_form textarea {
    background:#FFFFFF none repeat fixed 0 0;
    border: 1px solid #CCC;
    display:block;
    font-size:1.1em;
    height:150px;
    margin-top:5px;
    padding:5px;
    width: 360px;
}

#comment_form .form_row {
    width: 100%;
    margin-bottom: 15px;
}

#comment_form form input {
    margin-top: 5px;
    width: 200px;
    background:#FFFFFF none repeat fixed 0 0;
    border: 1px solid #CCC;
}

#comment_form .submit_btn {
    width: 80px;
    padding: 5px 10px;
    background: #EEEEEE;
    border: 1px solid #AAAAAA;
    color: #666666;
}

.service_box {
    margin-bottom: 40px;
}

.service_box .left {
    float: left;
    width: 120px;
    height: 120px;
}

.service_box .left img {
    width: 120px;
    height: 120px;
}

.service_box .right {
    float: right;
    width: 360px;
}

.service_box ol li {
    list-style: decimal-leading-zero;
    margin-bottom: 5px;
}

.service_box ol li a {
    color: #058edc;
}

/* gallery */
#gallery {
    clear: both;
}

#gallery a {
    border: none;
}
#gallery ul { list-style: none; margin: 0; padding: 0; }
#gallery ul li {
    padding: 0;
    margin: 0 0 40px 0;
    padding-bottom: 30px;
    border-bottom: 1px solid #CCC;
}

#gallery ul li .left {
    float: left;
    width: 190px;
}

#gallery ul li .left img {
    width: 180px;
    height: 110px;
    border: none;
    border: 5px solid #d4cbaf;
}

#gallery ul li .right {
    float: right;
    width: 280px;
}

#gallery ul li .right button {
    margin: 0;
}

/* end of gallery */

#contact_form form {
    margin: 0px;
    padding: 0px;
}

#contact_form form .input_field {
    width: 350px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #ccc;
}

#contact_form form label {
    display: block;
    width: 100px;
    margin-right: 10px;
    font-size: 14px;
}

#contact_form form textarea {
    width: 350px;
    height: 200px;
    background: #fff;
    border: 1px solid #ccc;
}

#contact_form form .submit_btn {
    margin-left: 110px;
    padding: 5px 10px;
    background: #EEEEEE;
    border: 1px solid #AAAAAA;
    color: #666666;
}

/* footer */

#templatemo_footer {
    clear: both;
    width: 860px;
    height: 50px;
    margin: 0 10px 0 100px;
    padding: 30px 0 0 0;
    text-align: center;
    color: #FFFFFF;
    background-image: image-url("templatemo_footer.png");
}

#templatemo_footer a {
    color: #FFFFFF;
}

#body_content_title{
    display: none;
}

【问题讨论】:

  • 请显示您的application.css文件的实际内容。
  • 循环依赖表明您在该文件中有对其自身的引用。删除文件不一定是解决办法
  • 我在帖子中添加了 scss.css 文件
  • 我应该删除我的css文件吗?然后再创建一次?

标签: css ruby-on-rails git heroku sass


【解决方案1】:

循环依赖

这是你的错误:

Sprockets::CircularDependencyError

循环依赖基本上是这个意思:

#app/assets/stylesheets/application.css
/* = require application */

当您在应用程序(可以是任何应用程序)中包含dependencies 时,您必须确保它们完全独立,因此它们不会与应用程序本身发生冲突。循环依赖基本上意味着您正在导入/需要的资产之一被您的应用程序和依赖项调用,从而创建了一个无限循环

解决此问题的方法是从您的应用程序或您可以控制的任何资产中删除对依赖项的引用

--

错误

你的错误很可能是这样的结果:

首先我将名称从 application.css 更改为 application.scss.erb

几乎可以肯定,问题在于您如何调用application.css.scss 及其依赖项。您的application.css.scss(将您的application.scss.css 更改为application.css.scss)文件没有给出任何循环循环的迹象,但是,我会确保您没有引用其中的任何外部文件

【讨论】:

    【解决方案2】:

    一种选择是删除 app/assets/stylesheets/application.css 来修复问题并解决问题。

    【讨论】:

    • 再创建这个文件?
    猜你喜欢
    • 1970-01-01
    • 2013-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-27
    相关资源
    最近更新 更多