git push heroku master でHerokuにデプロイしようとすると
remote: ! remote: ! Precompiling assets failed. remote: !
と出てしまいデプロイができません。
いろいろ調べて試してみたのですがどうもうまくいかず困っています。
PS C:\Users\UserName\Desktop\RailsProjects\Heroku> git push heroku master Enumerating objects: 286, done. Counting objects: 100% (286/286), done. Delta compression using up to 8 threads Compressing objects: 100% (256/256), done. Writing objects: 100% (286/286), 428.04 KiB | 3.89 MiB/s, done. Total 286 (delta 49), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. remote: Detected buildpacks: Ruby,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> Ruby app detected remote: -----> Installing bundler 1.17.3 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.6.6 remote: remote: ###### WARNING: remote: remote: Removing `Gemfile.lock` because it was generated on Windows. remote: Bundler will do a full resolve so native gems are handled properly. remote: This may result in unexpected gem versions being used in your app. remote: In rare occasions Bundler may not be able to resolve your dependencies at all. remote: https://devcenter.heroku.com/articles/bundler-windows-gemfile remote: remote: -----> Installing dependencies using bundler 1.17.3 remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 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: 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: Post-install message from bcrypt-ruby: remote: remote: ####################################################### remote: remote: The bcrypt-ruby gem has changed its name to just bcrypt. Instead of remote: installing `bcrypt-ruby`, you should install `bcrypt`. Please update your remote: dependencies accordingly. remote: remote: ####################################################### remote: remote: Post-install message from sass: remote: remote: Ruby Sass has reached end-of-life and should no longer be used. remote: remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new remote: primary implementation: https://sass-lang.com/install remote: remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the remote: sassc gem: https://github.com/sass/sassc-ruby#readme remote: remote: * For more details, please refer to the Sass blog: remote: https://sass-lang.com/blog/posts/7828841 remote: remote: Bundle completed (39.38s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v10.15.3-linux-x64 remote: -----> Detecting rake tasks remote: -----> Preparing app for Rails asset pipeline remote: Running: rake assets:precompile remote: Yarn executable was not detected in the system. remote: Download Yarn at https://yarnpkg.com/en/docs/install ~~~~~省略~~~~~~ remote: rake aborted! remote: Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true). remote: -- remote: 1338 remote: 1339 remote: 1340 }).call(this); remote: 1341 (function() { remote: 1342 remote: 1343 remote: 1344 }).call(this); ~~~~~省略~~~~~~ 3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define' remote: /tmp/build_cec5c1bd55df81db0efb03b906c6db13/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>' 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 app. remote: To https://git.heroku.com/app.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/app.git'
※コードは文字数制限で全て書けないので関係なさそうなコードの部分は省略しています。
何が原因でデプロイできないのでしょうか
詳しい方教えていただけると幸いです。
あなたの回答
tips
プレビュー