Моя производственная среда не имеет последних дополнений к нашей библиотеке javascript, и я считаю, что это связано с проблемой процесса сборки на Heroku.
Я заметил это, потому что недавние добавления javascript не работали в Prod, но работали локально. Затем я добавил несколько файлов console.logs в файл javascript и обнаружил, что они всегда будут работать локально, но никак не в Prod.
Я думаю, что проблема связана с тем, когда я собираю Heroku, так как я последовательно получайте «Исполняемый файл пряжи не обнаружен в системе». сообщение об ошибке. Сборка, кажется, все еще происходит (предварительная компиляция занимает 42 секунды), но мне интересно, может ли компонент javascript сломаться из-за ошибки пряжи.
Вот фрагмент того, что я вижу в своих журналах, когда Heroku строит из master:
-----> 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
Asset precompilation completed (42.77s)
Cleaning assets
Running: rake assets:clean
Я не верю, что я использую Yarn где-нибудь в этом проекте.
Затем я попытался выполнить предварительную компиляцию непосредственно в среде Heroku через терминал, но мне не повезло больше. Infact, я даже не уверен, что он скомпилировал что-либо с учетом ответа:
~ $ bundle exec rake assets:precompile
Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
~ $ rails --version
Rails 5.2.3
Полный журнал от развертывания Heroku ниже:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.4.0
-----> Vendoring libpq 5.12.1
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Installing dependencies using bundler 2.0.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Using rake 12.3.3
Using concurrent-ruby 1.1.5
Using i18n 1.6.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.3
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.4
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.2.0
Using actionview 5.2.3
Using rack 2.0.7
Using rack-test 1.1.0
Using actionpack 5.2.3
Using nio4r 2.4.0
Using websocket-extensions 0.1.4
Using websocket-driver 0.7.1
Using actioncable 5.2.3
Using globalid 0.4.2
Using activejob 5.2.3
Using mini_mime 1.0.2
Using mail 2.7.1
Using actionmailer 5.2.3
Using activemodel 5.2.3
Using arel 9.0.0
Using activerecord 5.2.3
Using mimemagic 0.3.3
Using marcel 0.3.3
Using activestorage 5.2.3
Using analytics-ruby 2.0.13
Using aws-eventstream 1.0.3
Using aws-partitions 1.217.0
Using aws-sigv4 1.1.0
Using jmespath 1.4.0
Using aws-sdk-core 3.68.0
Using aws-sdk-kms 1.24.0
Using aws-sdk-s3 1.48.0
Using bcrypt 3.1.12
Using msgpack 1.3.1
Using bootsnap 1.4.4
Using method_source 0.9.2
Using thor 0.20.3
Using railties 5.2.3
Using bootstrap-datepicker-rails 1.8.0.1
Using bundler 2.0.2
Using chart-js-rails 0.1.7
Using chartkick 3.3.0
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using coffee-script 2.4.1
Using coffee-rails 4.2.2
Using csv 3.1.2
Using orm_adapter 0.5.0
Using responders 2.4.0
Using warden 1.2.8
Using devise 4.5.0
Using unf_ext 0.0.7.6
Using unf 0.1.4
Using domain_name 0.5.20190701
Using dotenv 2.7.5
Using dotenv-rails 2.7.5
Using ffi 1.11.1
Using friendly_id 5.3.0
Using geocoder 1.5.2
Using groupdate 4.2.0
Using http-cookie 1.0.3
Using inline_svg 1.5.2
Using jbuilder 2.9.1
Using jquery-rails 4.3.5
Using mime-types-data 3.2019.0904
Using mime-types 3.3
Using netrc 0.11.0
Using rest-client 2.0.2
Using mailgun-ruby 1.2.0
Using mini_magick 4.9.5
Using pg 0.18.4
Using puma 3.12.1
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 5.2.3
Using rb-fsevent 0.10.3
Using rb-inotify 0.10.0
Using sass-listen 4.0.0
Using sass 3.7.4
Using tilt 2.0.9
Using sass-rails 5.1.0
Using social-share-button 1.2.1
Using turbolinks-source 5.2.0
Using turbolinks 5.2.0
Using uglifier 4.2.0
Bundle complete! 36 Gemfile dependencies, 95 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into `./vendor/bundle`
Bundle completed (0.42s)
Cleaning up the bundler cache.
-----> Installing node-v10.15.3-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
Asset precompilation completed (42.77s)
Cleaning assets
Running: rake assets:clean
-----> Detecting rails configuration
###### WARNING:
You are deploying to a non-production environment: "staging".
This is not recommended.
See https://devcenter.heroku.com/articles/deploying-to-a-custom-rails-environment for more information.
###### WARNING:
We detected that some binary dependencies required to
use all the preview features of Active Storage are not
present on this system.
For more information please see:
https://devcenter.heroku.com/articles/active-storage-on-heroku
###### WARNING:
There is a more recent Ruby version available for you to use:
2.4.9
The latest version will include security and bug fixes, we always recommend
running the latest version of your minor release.
Please upgrade your Ruby version.
For all available Ruby versions see:
https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
###### WARNING:
Potential EOL Ruby Version
You are using a Ruby version that has either reached its End of Life (EOL)
or will reach its End of Life on December 25th of this year.
We suggest you upgrade to Ruby 2.5.x or later
Once a Ruby version becomes EOL, it will no longer receive
security updates from Ruby core and may have serious vulnerabilities.
Please upgrade your Ruby version.
For a list of supported Ruby versions see:
https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
###### WARNING:
No Procfile detected, using the default web server.
We recommend explicitly declaring how to boot your server process via a Procfile.
https://devcenter.heroku.com/articles/ruby-default-web-server
-----> Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> console, rake, web
-----> Compressing...
Done: 119.6M
-----> Launching...
Released v119
https://zzzz.herokuapp.com/ deployed to Heroku