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

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

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

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

Ruby

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

Heroku

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

Q&A

解決済

1回答

937閲覧

RailsアプリをHerokuにデプロイするとビルド失敗する

MomeeMt

総合スコア11

Ruby on Rails 5

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

Ruby

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

Heroku

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

0グッド

0クリップ

投稿2019/03/24 05:13

Herokuへのデプロイでエラー

ID aa650cdb-14c9-4ee2-bb3f-14b283690d88 ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. Detected buildpacks: Ruby,Node.js See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order -----> Ruby app detected -----> Compiling Ruby/Rails -----> Using Ruby version: ruby-2.5.0 -----> Installing dependencies using bundler 1.15.2 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. Fetching gem metadata from https://rubygems.org/............ Fetching version metadata from https://rubygems.org/.. Fetching dependency metadata from https://rubygems.org/. (中略) Installing activerecord 5.2.1.1 Fetching actionpack 5.2.1.1 Installing actionpack 5.2.1.1 Fetching actioncable 5.2.1.1 Fetching actionmailer 5.2.1.1 Fetching activestorage 5.2.1.1 Installing actionmailer 5.2.1.1 Installing activestorage 5.2.1.1 Installing actioncable 5.2.1.1 Fetching railties 5.2.1.1 Installing railties 5.2.1.1 Fetching sprockets-rails 3.2.1 Installing sprockets-rails 3.2.1 Fetching sass-rails 5.0.7 Fetching slim-rails 3.1.3 Fetching rails 5.2.1.1 Installing rails 5.2.1.1 Installing slim-rails 3.1.3 Installing sass-rails 5.0.7 Bundle complete! 22 Gemfile dependencies, 65 gems now installed. Gems in the groups development and test were not installed. Bundled gems are installed into ./vendor/bundle. Post-install message from sass: Ruby Sass is deprecated and will be unmaintained as of 26 March 2019. * If you use Sass as a command-line tool, we recommend using Dart Sass, the new primary implementation: https://sass-lang.com/install * If you use Sass as a plug-in for a Ruby web framework, we recommend using the sassc gem: https://github.com/sass/sassc-ruby#readme * For more details, please refer to the Sass blog: http://sass.logdown.com/posts/7081811 Bundle completed (58.54s) Cleaning up the bundler cache. Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. The latest bundler is 2.0.1, but you are currently running 1.15.2. To update, run `gem install bundler` -----> Installing node-v10.14.1-linux-x64 -----> Detecting rake tasks -----> Preparing app for Rails asset pipeline Running: rake assets:precompile Yarn executable was not detected in the system. Download Yarn at https://yarnpkg.com/en/docs/install I, [2019-03-24T04:57:54.466551 #1621] INFO -- : Writing /tmp/build_f4e0c88a5f130f145e34942b333f1853/public/assets/favicon-0ad184623fa436976b2f032fcdedec6a55bb67ca4d4423687b91ab36648b399f.ico I, [2019-03-24T04:57:54.467003 #1621] INFO -- : Writing /tmp/build_f4e0c88a5f130f145e34942b333f1853/public/assets/favicon-0ad184623fa436976b2f032fcdedec6a55bb67ca4d4423687b91ab36648b399f.ico.gz rake aborted! Uglifier::Error: Unexpected token: name (home). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true). /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.20/lib/uglifier.rb:234:in `parse_result' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.20/lib/uglifier.rb:216:in `run_uglifyjs' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.20/lib/uglifier.rb:168:in `compile' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define' /tmp/build_f4e0c88a5f130f145e34942b333f1853/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>' Tasks: TOP => assets:precompile (See full trace by running task with --trace) ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app. ! Push failed

HerokuにRailsアプリケーションをデプロイすると、以上のようなエラーが発生し、ビルドが失敗します。
どうすればよいでしょうか。

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

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

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

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

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

guest

回答1

0

ベストアンサー

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

まずはこのエラーメッセージの指示に従ってみてはどうですか?

投稿2019/03/25 08:28

退会済みユーザー

退会済みユーザー

総合スコア0

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問