質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Q&A

解決済

1回答

397閲覧

Herokuへデプロイ時のエラーが解決できない。Precompiling assets failed

ul_

総合スコア15

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

0グッド

0クリップ

投稿2018/09/19 06:48

前提・実現したいこと

Herokuへデプロイしたいです。

Ruby on Railsでアプリケーションを作り、Herokuへデプロイしたいのですが、エラーが出て、数時間悩まされ続けています。

発生している問題・エラーメッセージ

Precompiling assets failed.が赤く表示されています。

該当のソースコード

以下、git push heroku masterした後のターミナルです。
一部文字数のため、fetch成功のところを省略しています。

git

1 2remote: Bundle complete! 27 Gemfile dependencies, 73 gems now installed. 3remote: Gems in the groups development and test were not installed. 4remote: Bundled gems are installed into ./vendor/bundle. 5remote: Post-install message from sass: 6remote: 7remote: Ruby Sass is deprecated and will be unmaintained as of 26 March 2019. 8remote: 9remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new 10remote: primary implementation: https://sass-lang.com/install 11remote: 12remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the 13remote: sassc gem: https://github.com/sass/sassc-ruby#readme 14remote: 15remote: * For more details, please refer to the Sass blog: 16remote: http://sass.logdown.com/posts/7081811 17remote: 18remote: Bundle completed (52.01s) 19remote: Cleaning up the bundler cache. 20remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. 21remote: The latest bundler is 1.16.5, but you are currently running 1.15.2. 22remote: To update, run `gem install bundler` 23remote: -----> Installing node-v8.10.0-linux-x64 24remote: -----> Detecting rake tasks 25remote: -----> Preparing app for Rails asset pipeline 26remote: Running: rake assets:precompile 27remote: Yarn executable was not detected in the system. 28remote: Download Yarn at https://yarnpkg.com/en/docs/install 29remote: rake aborted! 30remote: Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true). 31remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:234:in `parse_result' 32remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:216:in `run_uglifyjs' 33remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:168:in `compile' 34remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call' 35remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call' 36remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor' 37remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors' 38remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each' 39remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors' 40remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded' 41remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load' 42remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache' 43remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load' 44remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize' 45remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load' 46remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset' 47remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets' 48remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find' 49remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths' 50remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree' 51remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory' 52remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each' 53remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory' 54remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree' 55remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each' 56remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths' 57remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each' 58remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths' 59remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find' 60remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile' 61remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define' 62remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger' 63remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define' 64remote: /tmp/build_bc2e4864ab5a1aeebc622dd549e5990e/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>' 65remote: Tasks: TOP => assets:precompile 66remote: (See full trace by running task with --trace) 67remote: 68remote: ! 69remote: ! Precompiling assets failed. 70remote: ! 71remote: ! Push rejected, failed to compile Ruby app. 72remote: 73remote: ! Push failed 74remote: Verifying deploy... 75remote: 76remote: ! Push rejected to secure-citadel-87684. 77remote: 78To https://git.heroku.com/secure-citadel-87684.git 79 ! [remote rejected] master -> master (pre-receive hook declined) 80error: failed to push some refs to 'https://git.heroku.com/secure-citadel-87684.git' 81

試したこと

Qiitaの https://qiita.com/pokohide/items/017afa5be3b7dc200a8d の記事に書いてあるなど試しました。
しかし、良い結果にならず困っています。
sqlite3を開発環境のみにするなどは行っています。

補足情報(FW/ツールのバージョンなど)

Rails 5.1.2

解決方法などご存じの方いらっしゃれば、よろしくお願いいたします。
rails new して諦める道も検討しています。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

Uglifier::Error: Unexpected token: keyword (const). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).

原因も解決方法もここにある通りだと思うのですが、確認されましたか?

投稿2018/09/19 08:51

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

ul_

2018/09/21 13:35

回答ありがとうございます。試してみましたが、上手くいきませんでした。。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問