我无法将我的作品推向heroku,它说预编译资产失败了。
Counting objects: 256, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (206/206), done.
Writing objects: 100% (225/225), 13.13 MiB | 63.00 KiB/s, done.
Total 225 (delta 110), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Using set buildpack heroku/ruby
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using bundler 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Fetching gem metadata from https://rubygems.org/...........
remote: Fetching version metadata from https://rubygems.org/...
remote: Fetching dependency metadata from https://rubygems.org/..
remote: Rubygems 2.0.14.1 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote: Using rake 10.4.2
remote: Using i18n 0.7.0
remote: Using json 1.8.3
remote: Using minitest 5.8.3
remote: Using thread_safe 0.3.5
remote: Using tzinfo 1.2.2
remote: Using activesupport 4.1.10
remote: Using builder 3.2.2
remote: Using erubis 2.7.0
remote: Using actionview 4.1.10
remote: Using rack 1.5.5
remote: Using rack-test 0.6.3
remote: Using actionpack 4.1.10
remote: Using mime-types 2.99
remote: Using mail 2.6.3
remote: Using actionmailer 4.1.10
remote: Using activemodel 4.1.10
remote: Using arel 5.0.1.20140414130214
remote: Using activerecord 4.1.10
remote: Using bundler 1.9.7
remote: Using thor 0.19.1
remote: Using railties 4.1.10
remote: Using hike 1.2.3
remote: Using multi_json 1.11.2
remote: Using tilt 1.4.1
remote: Using sprockets 2.12.4
remote: Using sprockets-rails 2.3.3
remote: Using rails 4.1.10
remote: Installing animate-rails 1.0.9
remote: Using sass 3.2.19
remote: Using bootstrap-sass 3.2.0.2
remote: Using coffee-script-source 1.10.0
remote: Using execjs 2.6.0
remote: Using coffee-script 2.4.1
remote: Using coffee-rails 4.0.1
remote: Using jbuilder 2.3.2
remote: Using jquery-rails 3.1.4
remote: Using pg 0.18.4
remote: Using rails_serve_static_assets 0.0.4
remote: Using rails_stdout_logging 0.0.4
remote: Using rails_12factor 0.0.3
remote: Using rdoc 4.2.1
remote: Using sass-rails 4.0.5
remote: Using sdoc 0.4.1
remote: Using turbolinks 2.5.3
remote: Using uglifier 2.7.2
remote: Bundle complete! 17 Gemfile dependencies, 46 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (2.26s)
remote: Cleaning up the bundler cache.
remote: Removing foundation-rails (5.4.5.0)
remote: Removing animate-rails (1.0.8)
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: I, [2015-12-24T15:20:52.078180 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/1-4cbb1ecc6bdd2f37caf9995b60ce847d.jpg
remote: I, [2015-12-24T15:20:52.080165 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/10-425ad152efcd65a9ebb67af2f77afefd.jp
remote: I, [2015-12-24T15:20:52.081999 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/11-6f23c44a5ce44c3c5757467176c741d7.jp
remote: I, [2015-12-24T15:20:52.083659 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/12-f6408c4087f7eb4e95b41f337d40520f.jp
remote: I, [2015-12-24T15:20:52.086472 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/2-ce62cfdee46d1e645b8b4d4dda278dd5.jpg
remote: I, [2015-12-24T15:20:52.088604 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/3-37b49b1c573ee32192a6d04736a6da06.jpg
remote: I, [2015-12-24T15:20:52.090179 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/4-da6318f4ceae7042ca70da6826cd147a.jpg
remote: I, [2015-12-24T15:20:52.091768 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/5-95ace2335e7f30c12994163360006789.jpg
remote: I, [2015-12-24T15:20:52.093607 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/6-3bccbb9f5c5736f312fd2ef136492e78.jpg
remote: I, [2015-12-24T15:20:52.095230 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/7-c3a554b863e4c6c3a5a9215b5682e5e4.jpg
remote: I, [2015-12-24T15:20:52.111902 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/8-b879a47c346ec3aa6c1b4221c536a82c.jpg
remote: I, [2015-12-24T15:20:52.121537 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/9-5952738fd52265e05a6a665850c9e350.jpg
remote: I, [2015-12-24T15:20:52.132344 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color10-a1453bdc169543de911c50c726d631aa.png
remote: I, [2015-12-24T15:20:52.134337 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color2-c05102223f133d51038c04c58329e175.jpg
remote: I, [2015-12-24T15:20:52.136791 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color3-d8425686b9b44de521ac4eb26914b591.png
remote: I, [2015-12-24T15:20:52.138822 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color4-2a931ff1535a76febfaed6b4cb5cd8b2.jpg
remote: I, [2015-12-24T15:20:52.140663 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color5-d350936616773e6c8255eca797b75351.jpg
remote: I, [2015-12-24T15:20:52.142533 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color6-dcceabd608b30806e2f703869183a018.jpg
remote: I, [2015-12-24T15:20:52.144077 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color7-caf468158edb3ddba9f6bccc7e26dd96.jpg
remote: I, [2015-12-24T15:20:52.146966 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color8-7c3396ee56b8c43889e81f618a390477.png
remote: I, [2015-12-24T15:20:52.149676 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/color9-7785dbce7147e52dd4ee7ed8bcd9f187.png
remote: I, [2015-12-24T15:20:52.151602 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/colors-2a931ff1535a76febfaed6b4cb5cd8b2.jpg
remote: I, [2015-12-24T15:20:56.491976 #356] INFO -- : Writing /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/public/assets/application-936a006e2286017b7bd90985f922e7bf.js
remote: rake aborted!
remote: Sprockets::ArgumentError: Asset logical path has no extension: untitled
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/asset.rb:36:in `initialize'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/base.rb:380:in `new'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/base.rb:380:in `build_asset'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/index.rb:94:in `block in build_asset'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/caching.rb:58:in `cache_asset'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/index.rb:93:in `build_asset'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/base.rb:287:in `find_asset'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/index.rb:61:in `find_asset'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:211:in `block in find_asset'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:257:in `benchmark'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:210:in `find_asset'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:119:in `block in compile'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:118:in `each'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/sprockets/manifest.rb:118:in `compile'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/rake/sprocketstask.rb:146:in `with_logger'
remote: /tmp/build_6fdb5ba05d9f3e60d065e18f201180de/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
remote: Tasks: TOP => assets:precompile
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to high-techroofing.
remote:
To https://git.heroku.com/high-techroofing.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/high-techroofing.git'
当我把工作推到heroku时
我做了捆绑安装,但它不起作用,我在app.rb中添加了这段代码config.assets.initialize_on_precompile = false
,但它也不起作用
这是我的宝石文件
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.10'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
gem 'rails_12factor', group: :production
gem 'bootstrap-sass', '~> 3.2.0'
group :development do
gem "interactive_editor"
gem "hirb"
gem "awesome_print"
gem 'byebug'
end
gem "animate-rails"
请帮助我,我尝试了一切,但没有任何作用。请帮忙
答案 0 :(得分:-1)
检查您的资产/样式表并确保您的application.css 扩展名为.scss,因此应该看起来像application.css.scss