I am having an issue with pushing my app to Heroku. Below is my terminal output when I try to use "git push heroku master"
Counting objects: 22, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 2.16 KiB | 2.16 MiB/s, done.
Total 22 (delta 15), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.5.1
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/.........
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Using rake 12.3.1
remote: Using concurrent-ruby 1.0.5
remote: Using minitest 5.11.3
remote: Using thread_safe 0.3.6
remote: Using builder 3.2.3
remote: Using erubi 1.7.1
remote: Using mini_portile2 2.3.0
remote: Using crass 1.0.4
remote: Using rack 2.0.5
remote: Using nio4r 2.3.1
remote: Using websocket-extensions 0.1.3
remote: Using mini_mime 1.0.0
remote: Using arel 9.0.0
remote: Using mimemagic 0.3.2
remote: Using bcrypt 3.1.12
remote: Using msgpack 1.2.4
remote: Using bundler 1.15.2
remote: Using cancancan 2.2.0
remote: Using coffee-script-source 1.12.2
remote: Using execjs 2.7.0
remote: Using method_source 0.9.0
remote: Using thor 0.20.0
remote: Using orm_adapter 0.5.0
remote: Using ffi 1.9.25
remote: Using multi_json 1.13.1
remote: Using pg 1.0.0
remote: Using puma 3.12.0
remote: Using rb-fsevent 0.10.3
remote: Using tilt 2.0.8
remote: Using turbolinks-source 5.1.0
remote: Fetching will_paginate 3.1.6
remote: Using tzinfo 1.2.5
remote: Using nokogiri 1.8.4
remote: Using i18n 1.1.0
remote: Using rack-test 1.1.0
remote: Using warden 1.2.7
remote: Using sprockets 3.7.2
remote: Using mail 2.7.0
remote: Using websocket-driver 0.7.0
remote: Using marcel 0.3.2
remote: Using coffee-script 2.4.1
remote: Using uglifier 4.1.18
remote: Using rb-inotify 0.9.10
remote: Using bootsnap 1.3.1
remote: Using turbolinks 5.1.1
remote: Using loofah 2.2.2
remote: Using activesupport 5.2.1
remote: Using sass-listen 4.0.0
remote: Using rails-html-sanitizer 1.0.4
remote: Using rails-dom-testing 2.0.3
remote: Using globalid 0.4.1
remote: Using activemodel 5.2.1
remote: Using jbuilder 2.7.0
remote: Using sass 3.5.7
remote: Using actionview 5.2.1
remote: Using activejob 5.2.1
remote: Using activerecord 5.2.1
remote: Using actionpack 5.2.1
remote: Using actioncable 5.2.1
remote: Using actionmailer 5.2.1
remote: Using activestorage 5.2.1
remote: Using railties 5.2.1
remote: Using sprockets-rails 3.2.1
remote: Using coffee-rails 4.2.2
remote: Using responders 2.4.0
remote: Using jquery-rails 4.3.3
remote: Using rails 5.2.1
remote: Using sass-rails 5.0.7
remote: Using devise 4.5.0
remote: Installing will_paginate 3.1.6
remote: Bundle complete! 20 Gemfile dependencies, 69 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (3.33s)
remote: Cleaning up the bundler cache.
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.4). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: The latest bundler is 1.16.4, but you are currently running 1.15.2.
remote: To update, run `gem install bundler`
remote: -----> Installing node-v8.10.0-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: I, [2018-09-10T13:46:40.231019 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/0-2f224f1c26eb187a4e48a623951f607419e6582b45063cb2a247ed92b2dee9fd.png
remote: I, [2018-09-10T13:46:40.233643 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/1-e939388a981a2f5d794dc2c45f36224116d5d457d766baccfbafaab654933b89.png
remote: I, [2018-09-10T13:46:40.236052 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/2-c97fc71270db08081907559965118e78d296b15ead96645a309f0098bbfc9ab4.png
remote: I, [2018-09-10T13:46:40.238092 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/3-0fd2895b84fe6c3fe38b92e1282c65fab8b7b74fc6e92f8827d65451910d6ba4.png
remote: I, [2018-09-10T13:46:40.240552 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/4-de0b5807f5a4eeb9e90e6d171904ec57848010b65d20494419565f8424884c60.png
remote: I, [2018-09-10T13:46:40.242957 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/5-8dd2b09aa49f1caf833c87cc4bcb7700d31dc842e82c2fa60ddf84635af5693d.png
remote: I, [2018-09-10T13:46:40.249959 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/cancel-custom-off-e7d2ac9d0d0574c9b41e3f4b838a258d31f491f3ce616b695295b5754897528d.png
remote: I, [2018-09-10T13:46:40.252393 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/cancel-custom-on-e801e71a9008b085e080ca40ded7c86ee0aebcc5baee50f5c8282a1d4d14404d.png
remote: I, [2018-09-10T13:46:40.254896 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/cancel-off-5758f74356b87443c8dd8d07a98b4be8b9e5b0a6304baf27bbd2b99d8e02d01c.png
remote: I, [2018-09-10T13:46:40.256937 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/cancel-on-52afce0580c4df0b09e2302d54750e9d7b882b7c6c6847a16c98f606b2451389.png
remote: I, [2018-09-10T13:46:40.363704 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/off-12ebbed5d82fd3c5e97d907750d59738e230e120a2c6310a75f698f4e9a02d43.png
remote: I, [2018-09-10T13:46:40.366453 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/on-a138853be3ec7e6cb69a9e761fe1a2fe5985d17c2463a277f8da4a5ca7598039.png
remote: I, [2018-09-10T13:46:40.379200 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/star-half-mono-2faa84c4e49ad062e611850004ec93ec89760d221400969a70918b4248b333df.png
remote: I, [2018-09-10T13:46:40.381479 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/star-half-808ffaeee4006e4930f89f5dcf46f603eb173ecc365b8f3df2b822bb6747c0b8.png
remote: I, [2018-09-10T13:46:40.383760 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/star-off-cf9b07584547d5d561dfac9cdbf7b6a530cb72a1b7a1096411966036c4017d38.png
remote: I, [2018-09-10T13:46:40.385981 #394] INFO -- : Writing /tmp/build_d03dd820f3a6d398522db8ceeafe1812/public/assets/star-on-88233ad1abcd2282b53edb9465a6bef42fd32de319f014e4059353e4fd8a7e0a.png
remote: rake aborted!
remote: Uglifier::Error: Unexpected token name «scoreName», expected punc «,». To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:234:in `parse_result'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:216:in `run_uglifyjs'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.18/lib/uglifier.rb:168:in `compile'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:53:in `call'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/uglifier_compressor.rb:28:in `call'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote: /tmp/build_d03dd820f3a6d398522db8ceeafe1812/vendor/bundle/ruby/2.5.0/gems/rake-12.3.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 whispering-springs-21097.
remote:
To https://git.heroku.com/whispering-springs-21097.git
! [remote rejected] master -> master (pre-receive hook declined)
Below is also my gemfile.
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.1'
# Use sqlite3 as the database for Active Record
group :development, :test do
gem 'sqlite3'
end
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'jquery-rails', '~> 4.3', '>= 4.3.3'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'devise', '~> 4.5'
gem 'cancancan', '~> 2.2'
gem 'will_paginate', '~> 3.1.0'
group :production do
gem 'pg'
end
I am able to push the code to github without any problems. However, Heroku seems to keep coming up with the same issue.
Below is also my production.rb file.
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
config.action_mailer.default_url_options = { host: "whispering-springs-21097
.herokuapp.com" }
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = :local
# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable'
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug
# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "nameofapp_#{Rails.env}"
config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
# Use a different logger for distributed setups.
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end
Any advice would be greatly appreciated.
Uglifier::Error: Unexpected token name «scoreName», expected punc «,». To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true)
You just need to change
config.assets.js_compressor = :uglifier
to
config.assets.js_compressor = Uglifier.new(harmony: true)
in production.rb
(or the appropriate Heroku environment like staging.rb
where the error is being thrown in the build pipeline)
Source
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With