samedi 6 juillet 2019

Deploy rails app to Heroku Error ArgumentError: Invalid option: harmony

I finished my blog and I'm trying to deploy it to heroku, but I keep getting this error.

I've tried changing my production.rb, Gemfile, and application.js which was advised from other people with the same problems, but none of it worked. Here's what I've done

I changed my production.rb to this

        config.assets.js_compressor = Uglifier.new(harmony: true)

Application.js:


        //= require jquery
        //= require jquery_ujs
        //= require turbolinks
        //= require ckeditor/init
        //= require_tree .

I've changed jquery_ujs to rails_ujs and it didn't change anything

Gemfile


ruby '2.5.1'

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

group :development do
  gem 'sqlite3', '~> 1.3.6'
end

gem 'rails', '~> 5.2.1'
gem 'puma', '~> 3.11'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.0.3', require: 'uglifier'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'redcarpet', '~> 3.4'
gem 'pygments.rb', '~> 1.2', '>= 1.2.1'
gem 'friendly_id', '~> 5.2', '>= 5.2.4'
gem 'will_paginate', '~> 3.1', '>= 3.1.6'
gem 'mail_form', '~> 1.5', '>= 1.5.1'
gem 'devise', '~> 4.2'
gem "paperclip", "~> 6.0.0"
gem 'ckeditor', '~> 4.1'
gem 'meta-tags', '~> 2.1'
gem 'rb-readline', '~> 0.5.3'
gem 'cancancan'
gem 'carrierwave'
gem 'mini_magick'
gem 'social-share-button'





group :development, :test do
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
  gem 'capybara', '>= 2.15'
  gem 'selenium-webdriver'
  gem 'chromedriver-helper'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]


Here is my terminal

remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        ArgumentError: Invalid option: harmony
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/uglifier-2.7.2/lib/uglifier.rb:168:in `block in initialize'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/uglifier-2.7.2/lib/uglifier.rb:167:in `each'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/uglifier-2.7.2/lib/uglifier.rb:167:in `initialize'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/config/environments/production.rb:26:in `new'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/config/environments/production.rb:26:in `block in <main>'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:216:in `instance_eval'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/railtie.rb:216:in `configure'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/config/environments/production.rb:1:in `<main>'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:602:in `block (2 levels) in <class:Engine>'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:601:in `each'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/engine.rb:601:in `block in <class:Engine>'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:50:in `each'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:50:in `tsort_each_child'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/initializable.rb:60:in `run_initializers'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:361:in `initialize!'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/config/environment.rb:5:in `<main>'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:337:in `require_environment!'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote:        /tmp/build_08823881a010f97ecfcad2f83b760e2b/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
remote:        Tasks: TOP => environment
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 obscure-harbor-21335.

Any help would be appreciated thank you

Aucun commentaire:

Enregistrer un commentaire