我试图将一个Ruby应用程序部署到Heroku。该应用程序在本地工作正常但我在尝试部署时不断收到此错误。
对Ruby非常陌生我不知道自己哪里出错了。
我已经删除了bootstrap-theme.css.map,看看是否会产生影响。
我已经整个星期都在努力让这项工作继续下去并且不再进一步。
ruby 2.2.0p0(2014-12-25修订版49005)[x86_64-darwin14] Rails 4.2.0
任何想法
由于
Total 1679 (delta 1010), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Removing .DS_Store files
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.0
remote: -----> Installing dependencies using 1.7.12
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: Using rake 10.4.2
remote: Installing minitest 5.5.1
remote: Installing i18n 0.7.0
remote: Installing builder 3.2.2
remote: Installing thread_safe 0.3.5
remote: Installing mini_portile 0.6.2
remote: Installing erubis 2.7.0
remote: Installing rack 1.6.0
remote: Installing mime-types 2.4.3
remote: Installing arel 6.0.0
remote: Installing ice_nine 0.11.1
remote: Installing json 1.8.2
remote: Installing bootstrap_form 2.3.0
remote: Installing coffee-script-source 1.9.1
remote: Installing execjs 2.4.0
remote: Installing thor 0.19.1
remote: Installing equalizer 0.0.9
remote: Installing hashie 3.4.0
remote: Installing multi_json 1.11.0
remote: Installing multi_xml 0.5.5
remote: Installing hike 1.2.3
remote: Using bundler 1.7.12
remote: Installing bcrypt 3.1.10
remote: Using rdoc 4.2.0
remote: Installing tilt 1.4.1
remote: Installing sass 3.2.19
remote: Installing will_paginate 3.0.7
remote: Installing tzinfo 1.2.2
remote: Installing descendants_tracker 0.0.4
remote: Installing rack-test 0.6.3
remote: Installing rack-accept 0.4.5
remote: Installing rack-mount 0.8.3
remote: Installing mail 2.6.3
remote: Installing coffee-script 2.3.0
remote: Installing uglifier 2.7.1
remote: Installing sdoc 0.4.1
remote: Installing sprockets 2.12.3
remote: Installing activesupport 4.2.0
remote: Installing axiom-types 0.1.1
remote: Installing coercible 1.0.0
remote: Installing rails-deprecated_sanitizer 1.0.3
remote: Installing globalid 0.3.3
remote: Installing activemodel 4.2.0
remote: Installing climate_control 0.0.3
remote: Installing jbuilder 1.5.3
remote: Installing virtus 1.0.4
remote: Installing activejob 4.2.0
remote: Installing activerecord 4.2.0
remote: Installing protected_attributes 1.0.8
remote: Installing cocaine 0.5.7
remote: Installing grape 0.11.0
remote: Installing paperclip 4.2.1
remote: Installing nokogiri 1.6.6.2
remote: Installing loofah 2.0.1
remote: Installing rails-dom-testing 1.0.5
remote: Installing rails-html-sanitizer 1.0.2
remote: Installing actionview 4.2.0
remote: Installing actionpack 4.2.0
remote: Installing actionmailer 4.2.0
remote: Installing railties 4.2.0
remote: Installing pg 0.18.1
remote: Installing sprockets-rails 2.2.4
remote: Installing coffee-rails 4.0.1
remote: Installing jquery-rails 4.0.3
remote: Installing responders 2.1.0
remote: Installing jquery-ui-rails 5.0.3
remote: Installing sass-rails 4.0.5
remote: Installing turbolinks 2.5.3
remote: Installing rails 4.2.0
remote: Your bundle is complete!
remote: Gems in the groups development and test were not installed.
remote: It was installed into ./vendor/bundle
remote: Bundle completed (29.23s)
remote: Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/config/environments/production.rb:23)
remote: rake aborted!
remote: Sass::SyntaxError: Invalid CSS after "...":3,"sources":[": expected "|", was ""less/normalize..."
remote: (in /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/app/assets/bootstrap-3.1.1-dist/css/bootstrap.css.map)
remote: (sass):1
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1147:in `expected'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1085:in `expected'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1080:in `tok!'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:785:in `attrib_name!'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:753:in `attrib'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:672:in `simple_selector_sequence'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:646:in `_selector'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:619:in `selector'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:603:in `selector_sequence'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:528:in `ruleset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:591:in `block in declaration_or_ruleset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1123:in `call'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1123:in `rethrow'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:592:in `declaration_or_ruleset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:554:in `block_child'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:543:in `block_contents'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:535:in `block'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:529:in `ruleset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:553:in `block_child'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:543:in `block_contents'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:82:in `stylesheet'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:27:in `parse'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/engine.rb:342:in `_to_tree'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/engine.rb:315:in `_render'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sass-3.2.19/lib/sass/engine.rb:262:in `render'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/sass_compressor.rb:24:in `evaluate'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:197:in `block in evaluate'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `each'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `evaluate'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/bundled_asset.rb:25:in `initialize'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `new'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `build_asset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:211:in `block in find_asset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:257:in `benchmark'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:210:in `find_asset'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:119:in `block in compile'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `each'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `compile'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-2.12.3/lib/rake/sprocketstask.rb:146:in `with_logger'
remote: /tmp/build_4096e4ec1586ed9cc408dfe450ef9328/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-2.2.4/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 young-sands-7749.
remote:
To https://git.heroku.com/young-sands-7749.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/young-sands-7749.git'
答案 0 :(得分:0)
我遇到了类似的问题,我运行了捆绑更新,它有所帮助:
Installing spring 1.3.5 (was 1.3.4)
答案 1 :(得分:0)
我最终获得了部署到Heroku的应用程序代码。 我必须确保Ruby和Rails版本与Heroku支持的版本相匹配。然后我按照本指南:
https://devcenter.heroku.com/articles/getting-started-with-rails4
我仍然遇到的问题是数据库数据部署。开发数据库是SQLite3,Heroku不支持,所以我必须将数据迁移到PostgreSQL的本地实例。这被证明是一个挑战,并发布了另一个问题,试图解决这个问题。
感谢您的评论。 Sontya对R on no no有用。