Почему при развертывании на новом сервере Heroku возникает ошибка зависимости nokogiri и mini_portile2? - PullRequest
1 голос
/ 03 мая 2019

Я пытаюсь обновить приложение RoR для запуска на новом сервере Heroku. Я продолжаю получать ошибку:

'Downloading nokogiri-1.10.3 revealed dependencies not in the API or the lockfile
remote:        (mini_portile2 (~> 2.4.0)).
remote:        Either installing with `--full-index` or running `bundle 
update nokogiri` should
remote:        fix the problem. '.  

И мини_портили2, и нокогири появляются в Gemfile и Gemfile.Lock. Он работал нормально, используя старые версии на старых серверах. Новая версия работает для меня дома, используя rails server, не показывая проблем с зависимостями. Я проверял и проверял зависимости столько, сколько знаю, и следовал совету Heroku по установке с --full-index и запуску комплекта обновления nokogiri. Что мне нужно сделать, чтобы это работало? Я использую последнюю версию Cygwin и последние версии Ruby и Rails с верными верностями. Windows 7.

  1. bundle install --full-index # без изменений
  2. bundle update nokogiri # без изменений
  3. gem install nokogiri # без изменений
  4. gem install nokogiri --system-dependencies # без изменений
  5. gem install nokogiri -- --use-system-libraries --with-xml2-config=/usr/include/libxml2 --with-xslt-config=/usr/include/libxslt # nochange
  6. В Gemfile я попытался поставить mini_portile2 самостоятельно и в производственной группе. # без изменений

После каждой установки gem я обновляю / устанавливаю пакет.

Ошибка:

remote:        Installing i18n 0.9.5
remote:        Downloading nokogiri-1.10.3 revealed dependencies not in the API or the lockfile
remote:        (mini_portile2 (~> 2.4.0)).
remote:        Either installing with `--full-index` or running `bundle             update nokogiri` should
remote:        fix the problem.
remote:
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to vast-sea-55538.
remote:
To https://git.heroku.com/vast-sea-55538.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/vast-sea-55538.git'

Gem File:

source 'https://rubygems.org'

ruby '2.6.3', :patchlevel => '62'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rake', '~>12.0'
gem 'rails', '4.2.8'

# rails_12factor is required by Heroku
gem 'rails_12factor', group: :production

# Use sqlite3 as the database for Active Record

# Use production for AWS Beanstalk
# gem 'sqlite3', '~> 1.3.10', group: :production

# Use development for Heroku
 gem 'sqlite3', '~> 1.3.10', group: :development

# pg is required by Heroku
gem 'pg', '~>0.18.1', group: :production

# nokogiri dev dependencies

# gem 'concourse', '~> 0.24'
# gem 'hoe', '~> 3.17'
# gem 'hoe-bundler', '~> 1.2'
# gem 'hoe-debugging', '~> 2.0'
# gem 'hoe-gemspec', '~> 1.0'
# gem 'hoe-git', '~> 1.6'
# gem 'racc', '~> 1.4.14'
# gem 'rexical', '~> 1.0.5'
# gem 'simplecov', '~> 0.16'
# gem 'rake-compiler-dock', '~> 0.7.0'

# simplecov dependencies
# gem 'docile', '~> 1.1'
# gem 'simplecov-html', '~> 0.10.0'

# docile dependencies
# gem 'github-markup', '>= 0'
# gem 'redcarpet', '=> 0'
# gem 'yard', '=> 0'

# redcarpet dependencies
# gem 'test-unit', '~> 3.1.3'

# test-unit dependencies
# gem 'power_assert', '>= 0'
# gem 'kramdown', '>= 0'
# gem 'packnga', '>= 0'

# power_assert dependencies
# gem 'benchmark-ips', '>= 0'
# gem 'pry', '>= 0'

# pry dependencies
# gem 'coderay', '~> 1.1.0'
# gem 'method_source', '~> 0.9.0'

# kramdown dependencies
# gem 'rouge', '>= 0'
# gem 'stringex', '~> 1.5.1'

# stringex dependencies
# gem 'jeweler', '= 2.3.7'
# gem 'RedCloth', '= 4.2.9'
# gem 'travis-lint', '= 1.7.0'

# github-markup dependencies
# gem 'github-linguist', '>= 7.1.3'
# gem 'html-pipeline', '~> 1.0'
# gem 'nokogiri-diff', '>= 0.2.0'
# gem 'sanitize', '~> 2.1, >= 2.1.0'

# sanitize dependencies
# gem 'nokogumbo', '~> 2.0'

# Use SCSS for stylesheets
gem 'sassc'
gem 'sassc-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more:         https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'json', '~> 2.1.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring

# Use ActiveModel has_secure_password
gem 'rake-compiler', '~>1.0.3'
gem 'bcrypt', '~> 3.1.12'
# Use Unicorn as the app server
# gem 'unicorn'

gem 'mini_portile', '~> 0.6.2'

# mini_portile2 dependencies
# gem 'minitar', '~> 0.7'
# gem 'minitest-hooks', '~> 1.5.0'

# minitar dependencies
# gem 'hoe-doofus', '~> 1.0'
# gem 'hoe-gemspec2', '~>1.1'
# gem 'hoe-git', '~>1.6'
# gem 'hoe-rubygems', '~>1.0'
# gem 'hoe-travis', '~>1.2'
# gem 'minitest-autotest', '< 2, >= 1.0'

# minitest-autotest dependencies
# gem 'minitest-server', '~> 1.0'

# hoe-gemspec2 dependencies
# gem 'hoe-seattlerb', '>= 1.2'


# puma is required by AWS Beanstalk
# gem 'puma'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  gem 'rspec-rails', '~> 3.1'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
  gem 'spring'
end

group :production do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'mini_portile2', '~> 2.4.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...