Развертывание приложения rails to Heroku Ошибка ArgumentError: Неверный параметр: гармония - PullRequest
2 голосов
/ 06 июля 2019

Я закончил свой блог, и я пытаюсь развернуть его на heroku, но я продолжаю получать эту ошибку.

Я пытался изменить свои production.rb, Gemfile и application.js, которые были рекомендованы другими людьми с такими же проблемами, но ни одна из них не сработала.Вот что я сделал

Я изменил свой production.rb на этот

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

Application.js:


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

Я изменил jquery_ujs на rails_ujs иничего не изменилось

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]

Вот мой терминал после вызова "git push heroku master"

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.

Любая помощь будет оценена спасибо

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...