67941


# 実現したいこと

RailsアプリをHerokuへデプロイし、問題なくアプリを見れるようにすること

# 環境

Rails：5.2.4  
DB:PostgreSQL  
Rubyのbuildpackはインストール済  
(heroku create --buildpack <https://github.com/heroku/heroku-buildpack-
ruby.git>)

# 今起こっている問題

`git push heroku
master`する際に、2つのエラーが発生しており、デプロイできないでいます。別々に対処していますが、全く解決の糸口が見えず、解決方法がございましたら、ご教示頂けますと幸いです。

[code]

    remote:  !
    remote:  !     Precompiling assets failed.
    remote:  !
    remote:  !     Push rejected, failed to compile Ruby app.
    remote: 
    remote:  !     Push failed
    remote: Verifying deploy...
    remote: 
    remote: !       Push rejected to [アプリ名]
    remote: 
    To https://git.heroku.com/[アプリ名].git
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to '[アプリ名].git'
    
[/code]

# 試したこと

### ①Precompiling assets failed.について

下記コードで確認するも、`rake aborted`の表示により確認できず。

`RAILS_ENV=production bundle exec rake assets:precompile`

もう一度ログを辿ると、

[code]

    remote:        rake aborted!
    remote:        LoadError: cannot load such file -- uglifier
    
[/code]

を確認。そこで、[Heroku build fails on uglifier  
](https://stackoverrun.com/ja/q/7592880)の回答を参考に、下記を、`config/application.rb`に追記

[code]

    config.assets.js_compressor = :uglifier
    
    
[/code]

もう一度pushするが、結果は変わらず。

### ②error: failed to push some refs to〜.gitについて

[【Heroku】error: failed to push some refs toエラーの解決策  
](https://algorithm.joho.info/heroku/error-failed-to-push-some-refs-
to/)を参考に、下記を実行

[code]

    $ git fetch
    $ git rebase heroku/master 
    
[/code]

しかし、これでpushしてもエラーが変わらず。そこで、強制的だが、gitの時と同じくこちらのコマンドで対応

[code]

    $ git push -f heroku master 
    
[/code]

こちらも結果は変わりませんでした。

# その他

エラー全文と、Herokuのログを追記しました。

### エラー全文

[code]

    USER:tt.manager user$ git push heroku master
    Enumerating objects: 209, done.
    Counting objects: 100% (209/209), done.
    Delta compression using up to 8 threads
    Compressing objects: 100% (178/178), done.
    Writing objects: 100% (209/209), 181.92 KiB | 7.28 MiB/s, done.
    Total 209 (delta 29), reused 105 (delta 11)
    remote: Compressing source files... done.
    remote: Building source:
    remote: 
    remote: -----> Ruby app detected
    remote: -----> Installing bundler 2.0.2
    remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
    remote: -----> Compiling Ruby/Rails
    remote: -----> Using Ruby version: ruby-2.6.5
    remote: -----> Installing dependencies using bundler 2.0.2
    remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
    remote:        Your Gemfile lists the gem pg (>= 0.18, < 2.0) more than once.
    remote:        You should probably keep only one of them.
    remote:        Remove any duplicate entries and specify the gem only once (per group).
    remote:        While it's not a problem now, it could cause errors if you change the version of one of them later.
    remote:        The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
    remote:        Fetching gem metadata from https://rubygems.org/.........
    remote:        Fetching rake 13.0.1
    remote:        Installing rake 13.0.1
    remote:        Fetching concurrent-ruby 1.1.6
    remote:        Fetching minitest 5.14.1
    remote:        Fetching thread_safe 0.3.6
    remote:        Installing thread_safe 0.3.6
    remote:        Installing concurrent-ruby 1.1.6
    remote:        Installing minitest 5.14.1
    remote:        Fetching builder 3.2.4
    remote:        Fetching erubi 1.9.0
    remote:        Installing builder 3.2.4
    remote:        Installing erubi 1.9.0
    remote:        Fetching mini_portile2 2.4.0
    remote:        Installing mini_portile2 2.4.0
    remote:        Fetching crass 1.0.6
    remote:        Installing crass 1.0.6
    remote:        Fetching rack 2.2.2
    remote:        Fetching nio4r 2.5.2
    remote:        Installing rack 2.2.2
    remote:        Installing nio4r 2.5.2 with native extensions
    remote:        Fetching websocket-extensions 0.1.5
    remote:        Installing websocket-extensions 0.1.5
    remote:        Fetching mini_mime 1.0.2
    remote:        Installing mini_mime 1.0.2
    remote:        Fetching arel 9.0.0
    remote:        Installing arel 9.0.0
    remote:        Fetching mimemagic 0.3.5
    remote:        Installing mimemagic 0.3.5
    remote:        Fetching execjs 2.7.0
    remote:        Installing execjs 2.7.0
    remote:        Fetching bcrypt 3.1.13
    remote:        Fetching msgpack 1.3.3
    remote:        Installing bcrypt 3.1.13 with native extensions
    remote:        Installing msgpack 1.3.3 with native extensions
    remote:        Fetching popper_js 1.16.0
    remote:        Installing popper_js 1.16.0
    remote:        Fetching method_source 1.0.0
    remote:        Installing method_source 1.0.0
    remote:        Fetching thor 1.0.1
    remote:        Installing thor 1.0.1
    remote:        Fetching ffi 1.13.0
    remote:        Installing ffi 1.13.0 with native extensions
    remote:        Fetching tilt 2.0.10
    remote:        Installing tilt 2.0.10
    remote:        Using bundler 2.0.2
    remote:        Fetching cocoon 1.2.14
    remote:        Installing cocoon 1.2.14
    remote:        Fetching coderay 1.1.3
    remote:        Installing coderay 1.1.3
    remote:        Fetching orm_adapter 0.5.0
    remote:        Installing orm_adapter 0.5.0
    remote:        Fetching devise-bootstrap-views 1.1.0
    remote:        Installing devise-bootstrap-views 1.1.0
    remote:        Fetching devise-i18n-views 0.3.7
    remote:        Installing devise-i18n-views 0.3.7
    remote:        Fetching multi_json 1.14.1
    remote:        Installing multi_json 1.14.1
    remote:        Fetching hpricot 0.8.6
    remote:        Installing hpricot 0.8.6 with native extensions
    remote:        Fetching kaminari-core 1.2.1
    remote:        Installing kaminari-core 1.2.1
    remote:        Fetching pg 1.2.3
    remote:        Installing pg 1.2.3 with native extensions
    remote:        Fetching temple 0.8.2
    remote:        Installing temple 0.8.2
    remote:        Fetching turbolinks-source 5.2.0
    remote:        Installing turbolinks-source 5.2.0
    remote:        Fetching tzinfo 1.2.7
    remote:        Installing tzinfo 1.2.7
    remote:        Fetching nokogiri 1.10.9
    remote:        Installing nokogiri 1.10.9 with native extensions
    remote:        Fetching i18n 1.8.2
    remote:        Installing i18n 1.8.2
    remote:        Fetching websocket-driver 0.7.2
    remote:        Installing websocket-driver 0.7.2 with native extensions
    remote:        Fetching mail 2.7.1
    remote:        Installing mail 2.7.1
    remote:        Fetching rack-test 1.1.0
    remote:        Installing rack-test 1.1.0
    remote:        Fetching sprockets 4.0.0
    remote:        Installing sprockets 4.0.0
    remote:        Fetching warden 1.2.8
    remote:        Installing warden 1.2.8
    remote:        Fetching request_store 1.5.0
    remote:        Installing request_store 1.5.0
    remote:        Fetching rack-proxy 0.6.5
    remote:        Installing rack-proxy 0.6.5
    remote:        Fetching marcel 0.3.3
    remote:        Installing marcel 0.3.3
    remote:        Fetching autoprefixer-rails 9.7.6
    remote:        Installing autoprefixer-rails 9.7.6
    remote:        Fetching puma 4.3.5
    remote:        Installing puma 4.3.5 with native extensions
    remote:        Fetching pry 0.13.1
    remote:        Installing pry 0.13.1
    remote:        Fetching bootsnap 1.4.6
    remote:        Installing bootsnap 1.4.6 with native extensions
    remote:        Fetching sassc 2.3.0
    remote:        Installing sassc 2.3.0 with native extensions
    remote:        Fetching slim 4.1.0
    remote:        Installing slim 4.1.0
    remote:        Fetching turbolinks 5.2.1
    remote:        Installing turbolinks 5.2.1
    remote:        Fetching activesupport 5.2.4.3
    remote:        Installing activesupport 5.2.4.3
    remote:        Fetching html2slim 0.2.0
    remote:        Fetching loofah 2.5.0
    remote:        Installing loofah 2.5.0
    remote:        Installing html2slim 0.2.0
    remote:        Fetching pry-rails 0.3.9
    remote:        Installing pry-rails 0.3.9
    remote:        Fetching rails-dom-testing 2.0.3
    remote:        Installing rails-dom-testing 2.0.3
    remote:        Fetching globalid 0.4.2
    remote:        Installing globalid 0.4.2
    remote:        Fetching activemodel 5.2.4.3
    remote:        Installing activemodel 5.2.4.3
    remote:        Fetching jbuilder 2.10.0
    remote:        Installing jbuilder 2.10.0
    remote:        Fetching rails-html-sanitizer 1.3.0
    remote:        Fetching activejob 5.2.4.3
    remote:        Installing rails-html-sanitizer 1.3.0
    remote:        Installing activejob 5.2.4.3
    remote:        Fetching activerecord 5.2.4.3
    remote:        Installing activerecord 5.2.4.3
    remote:        Fetching actionview 5.2.4.3
    remote:        Installing actionview 5.2.4.3
    remote:        Fetching actionpack 5.2.4.3
    remote:        Installing actionpack 5.2.4.3
    remote:        Fetching kaminari-actionview 1.2.1
    remote:        Installing kaminari-actionview 1.2.1
    remote:        Fetching kaminari-activerecord 1.2.1
    remote:        Installing kaminari-activerecord 1.2.1
    remote:        Fetching polyamorous 2.3.2
    remote:        Installing polyamorous 2.3.2
    remote:        Fetching kaminari 1.2.1
    remote:        Installing kaminari 1.2.1
    remote:        Fetching ransack 2.3.2
    remote:        Installing ransack 2.3.2
    remote:        Fetching actioncable 5.2.4.3
    remote:        Installing actioncable 5.2.4.3
    remote:        Fetching actionmailer 5.2.4.3
    remote:        Installing actionmailer 5.2.4.3
    remote:        Fetching activestorage 5.2.4.3
    remote:        Fetching railties 5.2.4.3
    remote:        Installing activestorage 5.2.4.3
    remote:        Installing railties 5.2.4.3
    remote:        Fetching sprockets-rails 3.2.1
    remote:        Installing sprockets-rails 3.2.1
    remote:        Fetching gon 6.3.2
    remote:        Installing gon 6.3.2
    remote:        Fetching chart-js-rails 0.1.7
    remote:        Fetching responders 3.0.1
    remote:        Installing responders 3.0.1
    remote:        Installing chart-js-rails 0.1.7
    remote:        Fetching jquery-rails 4.4.0
    remote:        Fetching rails 5.2.4.3
    remote:        Installing rails 5.2.4.3
    remote:        Fetching momentjs-rails 2.20.1
    remote:        Installing jquery-rails 4.4.0
    remote:        Installing momentjs-rails 2.20.1
    remote:        Fetching rails-i18n 5.1.3
    remote:        Installing rails-i18n 5.1.3
    remote:        Fetching slim-rails 3.2.0
    remote:        Installing slim-rails 3.2.0
    remote:        Fetching webpacker 4.2.2
    remote:        Installing webpacker 4.2.2
    remote:        Fetching devise 4.7.1
    remote:        Installing devise 4.7.1
    remote:        Fetching kaminari-bootstrap 3.0.1
    remote:        Installing kaminari-bootstrap 3.0.1
    remote:        Fetching devise-i18n 1.9.1
    remote:        Installing devise-i18n 1.9.1
    remote:        Fetching sassc-rails 2.1.2
    remote:        Installing sassc-rails 2.1.2
    remote:        Fetching bootstrap 4.5.0
    remote:        Fetching sass-rails 6.0.0
    remote:        Installing sass-rails 6.0.0
    remote:        Installing bootstrap 4.5.0
    remote:        Bundle complete! 38 Gemfile dependencies, 90 gems now installed.
    remote:        Gems in the groups development and test were not installed.
    remote:        Bundled gems are installed into `./vendor/bundle`
    remote:        Post-install message from i18n:
    remote:        
    remote:        HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
    remote:        But that may break your application.
    remote:        
    remote:        If you are upgrading your Rails application from an older version of Rails:
    remote:        
    remote:        Please check your Rails app for 'config.i18n.fallbacks = true'.
    remote:        If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
    remote:        'config.i18n.fallbacks = [I18n.default_locale]'.
    remote:        If not, fallbacks will be broken in your app by I18n 1.1.x.
    remote:        
    remote:        If you are starting a NEW Rails application, you can ignore this notice.
    remote:        
    remote:        For more info see:
    remote:        https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
    remote:        
    remote:        Bundle completed (234.22s)
    remote:        Cleaning up the bundler cache.
    remote: -----> Installing node-v10.15.3-linux-x64
    remote: -----> Installing yarn-v1.16.0
    remote: -----> Detecting rake tasks
    remote: -----> Preparing app for Rails asset pipeline
    remote:        Running: rake assets:precompile
    remote:        yarn install v1.16.0
    remote:        [1/4] Resolving packages...
    remote:        [2/4] Fetching packages...
    remote:        info fsevents@2.1.3: The platform "linux" is incompatible with this module.
    remote:        info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
    remote:        info fsevents@1.2.13: The platform "linux" is incompatible with this module.
    remote:        info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
    remote:        [3/4] Linking dependencies...
    remote:        warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
    remote:        warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
    remote:        [4/4] Building fresh packages...
    remote:        Done in 27.11s.
    remote:        yarn install v1.16.0
    remote:        [1/4] Resolving packages...
    remote:        [2/4] Fetching packages...
    remote:        info fsevents@2.1.3: The platform "linux" is incompatible with this module.
    remote:        info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
    remote:        info fsevents@1.2.13: The platform "linux" is incompatible with this module.
    remote:        info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
    remote:        [3/4] Linking dependencies...
    remote:        warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
    remote:        warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
    remote:        [4/4] Building fresh packages...
    remote:        Done in 5.73s.
    remote:        rake aborted!
    remote:        LoadError: cannot load such file -- uglifier
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/autoload/uglifier.rb:2:in `<main>'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/uglifier_compressor.rb:43:in `initialize
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/uglifier_compressor.rb:26:in `new'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/uglifier_compressor.rb:26:in `instance'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/uglifier_compressor.rb:30:in `call'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:84:in `call_processor
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `reverse_each'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `call_processors'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:182:in `load_from_unloaded'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:59:in `block in load'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:335:in `fetch_asset_from_dependency_cache'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:43:in `load'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/cached_environment.rb:44:in `load'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/bundle.rb:32:in `block in call'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/bundle.rb:31:in `call'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:84:in `call_processor
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:66:in `block in call_processors'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `reverse_each'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/processor_utils.rb:65:in `call_processors'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:182:in `load_from_unloaded'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:59:in `block in load'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:335:in `fetch_asset_from_dependency_cache'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/loader.rb:43:in `load'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/cached_environment.rb:44:in `load'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:81:in `find_asset'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/base.rb:88:in `find_all_linked_assets'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.0/lib/sprockets/manifest.rb:125:in `block (2 levels) in find'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:24:in `block in execute'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `block in synchronize'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb:19:in `execute'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/promise.rb:563:in `block in realize'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:353:in `run_task'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:342:in `block (3 levels) in create_worker'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:325:in `loop'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:325:in `block (2 levels) in create_worker'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:324:in `catch'
    remote:        /tmp/build_766ffab2466e42f825b9e77071bc1f96/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:324:in `block in create_worker'
    remote:        Tasks: TOP => assets:precompile
    remote:        (See full trace by running task with --trace)
    remote: 
    remote:  !
    remote:  !     Precompiling assets failed.
    remote:  !
    remote:  !     Push rejected, failed to compile Ruby app.
    remote: 
    remote:  !     Push failed
    remote: Verifying deploy...
    remote: 
    remote: !       Push rejected to quiet-escarpment-59252.
    remote: 
    To https://git.heroku.com/quiet-escarpment-59252.git
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'https://git.heroku.com/quiet-escarpment-59252.git'
    
    
[/code]

### Herokuのログ

[code]

    USER:tt.manager user$ heroku logs
    2020-06-23T23:13:40.437814+00:00 app[api]: Initial release by user@gmail.com
    2020-06-23T23:13:40.437814+00:00 app[api]: Release v1 created by user user@gmail.com
    2020-06-23T23:13:40.555521+00:00 app[api]: Release v2 created by user user@gmail.com
    2020-06-23T23:13:40.555521+00:00 app[api]: Enable Logplex by user user@gmail.com
    2020-06-23T23:27:34.000000+00:00 app[api]: Build started by user user@gmail.com
    2020-06-23T23:31:47.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9d484bc3-b7b6-4de9-8aaf-292aac539a19/activity/builds/c6cc724f-8cc0-451d-ae62-9ec869d0904b
    2020-06-24T00:13:41.000000+00:00 app[api]: Build started by user user@gmail.com
    2020-06-24T00:18:19.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9d484bc3-b7b6-4de9-8aaf-292aac539a19/activity/builds/ee7ffc0b-8b43-4312-bc2b-f3d1ce1787cb
    2020-06-24T00:43:21.000000+00:00 app[api]: Build started by user user@gmail.com
    2020-06-24T00:47:45.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9d484bc3-b7b6-4de9-8aaf-292aac539a19/activity/builds/d431367b-c625-475f-bebf-5f7203d9e507
    2020-06-24T00:49:20.000000+00:00 app[api]: Build started by user user@gmail.com
    2020-06-24T00:53:36.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9d484bc3-b7b6-4de9-8aaf-292aac539a19/activity/builds/a7742a76-b35d-4e31-ba0f-77d2ef59c9d9
    2020-06-24T01:10:36.000000+00:00 app[api]: Build started by user user@gmail.com
    2020-06-24T01:14:57.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9d484bc3-b7b6-4de9-8aaf-292aac539a19/activity/builds/3176a4df-330f-4b1c-9fbe-986ab31b7a17
    2020-06-24T01:20:19.520837+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=quiet-escarpment-59252.herokuapp.com request_id=280d8635-db41-4da4-ad23-fbfb94aaea92 fwd="103.5.140.141" dyno= connect= service= status=502 bytes= protocol=https
    2020-06-24T01:20:19.885714+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=quiet-escarpment-59252.herokuapp.com request_id=b7340efc-ad58-4f0a-88dd-d48dc8d56113 fwd="103.5.140.141" dyno= connect= service= status=502 bytes= protocol=https
    2020-06-24T01:29:38.000000+00:00 app[api]: Build started by user user@gmail.com
    2020-06-24T01:33:54.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9d484bc3-b7b6-4de9-8aaf-292aac539a19/activity/builds/da5457d1-1199-44ed-9952-244b79412b0a
    2020-06-24T01:34:11.000000+00:00 app[api]: Build started by user user@gmail.com
    2020-06-24T01:38:49.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9d484bc3-b7b6-4de9-8aaf-292aac539a19/activity/builds/009aabba-40e3-48cb-a430-e93f8bb99711
    2020-06-24T01:41:52.652821+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=quiet-escarpment-59252.herokuapp.com request_id=891db6c9-af82-4a18-a44c-a5d0e1a548a7 fwd="103.5.140.141" dyno= connect= service= status=502 bytes= protocol=https
    2020-06-24T01:41:52.985462+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=quiet-escarpment-59252.herokuapp.com request_id=e7b9a64b-1360-4fd7-a645-9c6cf6053502 fwd="103.5.140.141" dyno= connect= service= status=502 bytes= protocol=https
    
[/code]

リモートリポジトリ

[code]

    $ git remote -v
    heroku  https://git.heroku.com/quiet-escarpment-59252.git (fetch)
    heroku  https://git.heroku.com/quiet-escarpment-59252.git (push)
    
[/code]


CC BY-SA 4.0
2020-06-24T01:47:43.323
67934
2020-06-24T16:55:22.647
2020-06-24T16:55:22.647
39475
39475
question
ruby-on-rails git heroku デプロイ
git push heroku masterで発生するエラー（ Precompiling assets failed., error: failed to push some refs to）について


Gemfile に `uglifier` の gem は追加されていますか? それを追加したあと実行すれば、この事象は解決すると思います。


CC BY-SA 4.0
2020-06-24T04:02:20.277
67941
2020-06-24T04:02:20.277
754
67934
answer