Как доставить sh в Heroku без получения «Извините, но что-то пошло не так» - PullRequest
0 голосов
/ 25 марта 2020

Я отправил приложение Rails в Heroku, и оно работало хорошо как локально, так и на производстве. Затем я внес некоторые изменения и запихнул их в Github, а затем в Heroku.

После внесенных изменений мое приложение работает нормально локально, но в производственной среде возвращается «Извините, но что-то пошло не так».

Я попытался отправить sh еще раз в Heroku, но, тем не менее, возникла та же проблема.

Вот журналы Heroku:

-----> Ruby app detected
-----> Installing bundler 2.0.2
-----> Removing BUNDLED WITH version in the Gemfile.lock
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.6.3
-----> 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`.
       Fetching gem metadata from https://rubygems.org/............
       Using rake 13.0.1
       Using concurrent-ruby 1.1.6
       Using minitest 5.14.0
       Using thread_safe 0.3.6
       Using zeitwerk 2.3.0
       Using builder 3.2.4
       Using erubi 1.9.0
       Using mini_portile2 2.4.0
       Using crass 1.0.6
       Using rack 2.2.2
       Using nio4r 2.5.2
       Using websocket-extensions 0.1.4
       Using mimemagic 0.3.4
       Using mini_mime 1.0.2
       Using execjs 2.7.0
       Fetching aws_cf_signer 0.1.3
       Using msgpack 1.3.3
       Using bundler 2.0.2
       Fetching http-accept 1.7.0
       Fetching unf_ext 0.0.7.6
       Installing aws_cf_signer 0.1.3
       Installing http-accept 1.7.0
       Installing unf_ext 0.0.7.6 with native extensions
       Fetching mime-types-data 3.2019.1009
       Fetching netrc 0.11.0
       Installing netrc 0.11.0
       Installing mime-types-data 3.2019.1009
       Using ffi 1.12.2
       Using method_source 1.0.0
       Using pg 1.2.3
       Using thor 1.0.1
       Using tilt 2.0.10
       Using turbolinks-source 5.2.0
       Using i18n 1.8.2
       Using nokogiri 1.10.9
       Using rack-test 1.1.0
       Using websocket-driver 0.7.1
       Using marcel 0.3.3
       Using mail 2.7.1
       Using autoprefixer-rails 9.7.5
       Using puma 4.3.3
       Using rack-proxy 0.6.5
       Using sprockets 4.0.0
       Using tzinfo 1.2.6
       Using bootsnap 1.4.6
       Using sassc 2.2.1
       Using loofah 2.4.0
       Using turbolinks 5.2.1
       Using activesupport 6.0.2.2
       Using rails-html-sanitizer 1.3.0
       Using font-awesome-sass 5.6.1
       Using rails-dom-testing 2.0.3
       Using globalid 0.4.2
       Using activemodel 6.0.2.2
       Using jbuilder 2.10.0
       Using actionview 6.0.2.2
       Using activejob 6.0.2.2
       Using activerecord 6.0.2.2
       Using actionpack 6.0.2.2
       Using actioncable 6.0.2.2
       Using activestorage 6.0.2.2
       Using actionmailer 6.0.2.2
       Using railties 6.0.2.2
       Using sprockets-rails 3.2.1
       Using simple_form 5.0.2
       Using actionmailbox 6.0.2.2
       Using actiontext 6.0.2.2
       Using sassc-rails 2.1.2
       Using webpacker 4.2.2
       Using rails 6.0.2.2
       Using sass-rails 6.0.0
       Fetching mime-types 3.3.1
       Installing mime-types 3.3.1
       Fetching unf 0.1.4
       Installing unf 0.1.4
       Fetching domain_name 0.5.20190701
       Installing domain_name 0.5.20190701
       Fetching http-cookie 1.0.3
       Installing http-cookie 1.0.3
       Fetching rest-client 2.1.0
       Installing rest-client 2.1.0
       Fetching cloudinary 1.12.0
       Installing cloudinary 1.12.0
       Bundle complete! 21 Gemfile dependencies, 72 gems now installed.
       Gems in the groups development and test were not installed.
       Bundled gems are installed into `./vendor/bundle`
       Bundle completed (8.56s)
       Cleaning up the bundler cache.
-----> Installing node-v10.15.3-linux-x64
-----> Installing yarn-v1.16.0
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       yarn install v1.16.0
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       info fsevents@1.2.12: The platform "linux" is incompatible with this module.
       info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       warning " > webpack-dev-server@3.10.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
       warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
       [4/4] Building fresh packages...
       Done in 23.41s.
       yarn install v1.16.0
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       info fsevents@1.2.12: The platform "linux" is incompatible with this module.
       info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
       [3/4] Linking dependencies...
       warning " > webpack-dev-server@3.10.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
       warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
       [4/4] Building fresh packages...
       Done in 5.08s.
       I, [2020-03-25T00:51:48.116347 #370]  INFO -- : Writing /tmp/build_0c7a439c899edfd605aabbe34ae0f6c6/public/assets/application-6d12af72b0e0f0a83f0b9fc7416a2be9d63521940114ddc768b5538e64cc055b.css
       I, [2020-03-25T00:51:48.117001 #370]  INFO -- : Writing /tmp/build_0c7a439c899edfd605aabbe34ae0f6c6/public/assets/application-6d12af72b0e0f0a83f0b9fc7416a2be9d63521940114ddc768b5538e64cc055b.css.gz
       I, [2020-03-25T00:51:48.123333 #370]  INFO -- : Writing /tmp/build_0c7a439c899edfd605aabbe34ae0f6c6/public/assets/cocktails-2cd9a1aad4e3012b35cbd47ddfbaad5559d5dbe1b5029e1886dde171a95fe760.css
       I, [2020-03-25T00:51:48.123780 #370]  INFO -- : Writing /tmp/build_0c7a439c899edfd605aabbe34ae0f6c6/public/assets/cocktails-2cd9a1aad4e3012b35cbd47ddfbaad5559d5dbe1b5029e1886dde171a95fe760.css.gz
       Compiling...
       Compiled all packs in /tmp/build_0c7a439c899edfd605aabbe34ae0f6c6/public/packs
       Hash: 17506f4aee7b2d161234
       Version: webpack 4.42.1
       Time: 12076ms
       Built at: 03/25/2020 12:52:02 AM
                                                    Asset       Size  Chunks                                Chunk Names
                   js/application-031d7bf5d75c230c3fd5.js    236 KiB       0  [emitted] [immutable]         application
       js/application-031d7bf5d75c230c3fd5.js.LICENSE.txt   1.95 KiB          [emitted]                     
                js/application-031d7bf5d75c230c3fd5.js.gz   68.8 KiB          [emitted]                     
               js/application-031d7bf5d75c230c3fd5.js.map    984 KiB       0  [emitted] [dev]               application
            js/application-031d7bf5d75c230c3fd5.js.map.gz    268 KiB          [emitted]              [big]  
                                            manifest.json  364 bytes          [emitted]                     
                                         manifest.json.gz  142 bytes          [emitted]                     
       Entrypoint application = js/application-031d7bf5d75c230c3fd5.js js/application-031d7bf5d75c230c3fd5.js.map
        [1] (webpack)/buildin/module.js 552 bytes {0} [built]
        [3] ./app/javascript/packs/application.js 760 bytes {0} [built]
        [7] ./app/javascript/channels/index.js 205 bytes {0} [built]
        [8] ./app/javascript/channels sync _channel\.js$ 160 bytes {0} [built]
       [10] (webpack)/buildin/global.js 905 bytes {0} [built]
           + 6 hidden modules

       WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
       This can impact web performance.
       Assets: 
         js/application-031d7bf5d75c230c3fd5.js.map.gz (268 KiB)

       WARNING in webpack performance recommendations: 
       You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
       For more info visit https://webpack.js.org/guides/code-splitting/

       Asset precompilation completed (48.19s)
       Cleaning assets
       Running: rake assets:clean
-----> Detecting rails configuration
###### WARNING:
       You set your `config.active_storage.service` to :local in production.
       If you are uploading files to this app, they will not persist after the app
       is restarted, on one-off dynos, or if the app has multiple dynos.
       Heroku applications have an ephemeral file system. To
       persist uploaded files, please use a service such as S3 and update your Rails
       configuration.

       For more information can be found in this article:
         https://devcenter.heroku.com/articles/active-storage-on-heroku

###### 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.6.5

       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:
       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: 109M
-----> Launching...
       Released v8

Это журналы героку - хвост:

2020-03-25T19:26:43.394454+00:00 app[api]: Release v2 created by user marcmontis7@gmail.com
2020-03-25T19:26:43.158351+00:00 app[api]: Release v1 created by user marcmontis7@gmail.com
2020-03-25T19:26:43.158351+00:00 app[api]: Initial release by user marcmontis7@gmail.com
2020-03-25T19:26:43.394454+00:00 app[api]: Enable Logplex by user marcmontis7@gmail.com
2020-03-25T19:27:00.000000+00:00 app[api]: Build started by user marcmontis7@gmail.com
2020-03-25T19:31:18.044427+00:00 app[api]: Set LANG, RACK_ENV, RAILS_ENV, RAILS_LOG_TO_STDOUT, RAILS_SERVE_STATIC_FILES, SECRET_KEY_BASE config vars by user marcmontis7@gmail.com
2020-03-25T19:31:18.044427+00:00 app[api]: Release v3 created by user marcmontis7@gmail.com
2020-03-25T19:31:18.961809+00:00 app[api]: Release v5 created by user marcmontis7@gmail.com
2020-03-25T19:31:18.940280+00:00 app[api]: Attach DATABASE (@ref:postgresql-crystalline-27252) by user marcmontis7@gmail.com
2020-03-25T19:31:18.940280+00:00 app[api]: Running release v4 commands by user marcmontis7@gmail.com
2020-03-25T19:31:19.647477+00:00 app[api]: Deploy 6ceb7f47 by user marcmontis7@gmail.com
2020-03-25T19:31:18.961809+00:00 app[api]: @ref:postgresql-crystalline-27252 completed provisioning, setting DATABASE_URL. by user marcmontis7@gmail.com
2020-03-25T19:31:19.647477+00:00 app[api]: Release v6 created by user marcmontis7@gmail.com
2020-03-25T19:31:19.661884+00:00 app[api]: Scaled to console@0:Free rake@0:Free web@1:Free by user marcmontis7@gmail.com
2020-03-25T19:31:27.826505+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 22735 -e production`
2020-03-25T19:31:27.000000+00:00 app[api]: Build succeeded
2020-03-25T19:31:33.290866+00:00 app[web.1]: => Booting Puma
2020-03-25T19:31:33.290885+00:00 app[web.1]: => Rails 6.0.2.2 application starting in production
2020-03-25T19:31:33.290885+00:00 app[web.1]: => Run `rails server --help` for more startup options
2020-03-25T19:31:35.130166+00:00 heroku[web.1]: State changed from starting to up
2020-03-25T19:31:34.971861+00:00 app[web.1]: Puma starting in single mode...
2020-03-25T19:31:34.971902+00:00 app[web.1]: * Version 4.3.3 (ruby 2.6.3-p62), codename: Mysterious Traveller
2020-03-25T19:31:34.971903+00:00 app[web.1]: * Min threads: 5, max threads: 5
2020-03-25T19:31:34.971904+00:00 app[web.1]: * Environment: production
2020-03-25T19:31:34.972146+00:00 app[web.1]: * Listening on tcp://0.0.0.0:22735
2020-03-25T19:31:34.972590+00:00 app[web.1]: Use Ctrl-C to stop
2020-03-25T19:31:47.533670+00:00 app[api]: Starting process with command `rails db:migrate` by user marcmontis7@gmail.com
2020-03-25T19:31:55.720200+00:00 heroku[run.5823]: State changed from starting to up
2020-03-25T19:31:55.704267+00:00 heroku[run.5823]: Awaiting client
2020-03-25T19:31:56.010436+00:00 heroku[run.5823]: Starting process with command `rails db:migrate`
2020-03-25T19:32:05.629419+00:00 heroku[run.5823]: State changed from up to complete
2020-03-25T19:32:05.614695+00:00 heroku[run.5823]: Process exited with status 0
2020-03-25T19:32:18.278896+00:00 heroku[router]: at=info method=GET path="/" host=mister-cocktail-marc7.herokuapp.com request_id=3a7521ec-f4a9-4228-90ea-a6e36d24aa74 fwd="79.37.123.217" dyno=web.1 connect=0ms service=64ms status=200 bytes=2650 protocol=https
2020-03-25T19:32:18.216781+00:00 app[web.1]: I, [2020-03-25T19:32:18.216658 #4]  INFO -- : [3a7521ec-f4a9-4228-90ea-a6e36d24aa74] Started GET "/" for 79.37.123.217 at 2020-03-25 19:32:18 +0000
2020-03-25T19:32:18.219270+00:00 app[web.1]: I, [2020-03-25T19:32:18.219205 #4]  INFO -- : [3a7521ec-f4a9-4228-90ea-a6e36d24aa74] Processing by CocktailsController#index as HTML
2020-03-25T19:32:18.227762+00:00 app[web.1]: I, [2020-03-25T19:32:18.227702 #4]  INFO -- : [3a7521ec-f4a9-4228-90ea-a6e36d24aa74]   Rendering cocktails/index.html.erb within layouts/application
2020-03-25T19:32:18.229571+00:00 app[web.1]: I, [2020-03-25T19:32:18.229518 #4]  INFO -- : [3a7521ec-f4a9-4228-90ea-a6e36d24aa74]   Rendered shared/_navbar.html.erb (Duration: 0.9ms | Allocations: 349)
2020-03-25T19:32:18.268988+00:00 app[web.1]: D, [2020-03-25T19:32:18.268868 #4] DEBUG -- : [3a7521ec-f4a9-4228-90ea-a6e36d24aa74]   Cocktail Load (1.4ms)  SELECT "cocktails".* FROM "cocktails"
2020-03-25T19:32:18.275018+00:00 app[web.1]: I, [2020-03-25T19:32:18.274946 #4]  INFO -- : [3a7521ec-f4a9-4228-90ea-a6e36d24aa74]   Rendered shared/_footer.html.erb (Duration: 0.4ms | Allocations: 95)
2020-03-25T19:32:18.275122+00:00 app[web.1]: I, [2020-03-25T19:32:18.275065 #4]  INFO -- : [3a7521ec-f4a9-4228-90ea-a6e36d24aa74]   Rendered cocktails/index.html.erb within layouts/application (Duration: 47.3ms | Allocations: 4922)
2020-03-25T19:32:18.276627+00:00 app[web.1]: I, [2020-03-25T19:32:18.276569 #4]  INFO -- : [3a7521ec-f4a9-4228-90ea-a6e36d24aa74] Completed 200 OK in 57ms (Views: 50.1ms | ActiveRecord: 16.3ms | Allocations: 7557)
2020-03-25T19:32:18.389340+00:00 heroku[router]: at=info method=GET path="/assets/application-b4ffe8fbd8271964d92b0211028837b3717cc5077d051c61e88ef37201aadf5b.css" host=mister-cocktail-marc7.herokuapp.com request_id=70cfee4d-5e8a-4082-8ce4-b73e9e6b2c6f fwd="79.37.123.217" dyno=web.1 connect=0ms service=9ms status=200 bytes=36240 protocol=https
2020-03-25T19:32:18.808729+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mister-cocktail-marc7.herokuapp.com request_id=cf1cf9b6-7a0a-4f85-8336-18a6d64582ba fwd="79.37.123.217" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2020-03-25T19:32:53.265282+00:00 app[api]: Starting process with command `rails db:seed` by user marcmontis7@gmail.com
2020-03-25T19:33:01.113643+00:00 heroku[run.9006]: State changed from starting to up
2020-03-25T19:33:01.205804+00:00 heroku[run.9006]: Awaiting client
2020-03-25T19:33:01.544681+00:00 heroku[run.9006]: Starting process with command `rails db:seed`
2020-03-25T19:33:13.015876+00:00 heroku[run.9006]: State changed from up to complete
2020-03-25T19:33:13.001552+00:00 heroku[run.9006]: Process exited with status 0
2020-03-25T19:33:20.811285+00:00 app[web.1]: I, [2020-03-25T19:33:20.811170 #4]  INFO -- : [166fbca2-682f-401f-8ced-bff86ef77a3c] Started GET "/" for 79.37.123.217 at 2020-03-25 19:33:20 +0000
2020-03-25T19:33:20.813138+00:00 app[web.1]: I, [2020-03-25T19:33:20.813065 #4]  INFO -- : [166fbca2-682f-401f-8ced-bff86ef77a3c] Processing by CocktailsController#index as HTML
2020-03-25T19:33:20.815350+00:00 app[web.1]: I, [2020-03-25T19:33:20.815280 #4]  INFO -- : [166fbca2-682f-401f-8ced-bff86ef77a3c]   Rendering cocktails/index.html.erb within layouts/application
2020-03-25T19:33:20.816658+00:00 app[web.1]: I, [2020-03-25T19:33:20.816597 #4]  INFO -- : [166fbca2-682f-401f-8ced-bff86ef77a3c]   Rendered shared/_navbar.html.erb (Duration: 0.8ms | Allocations: 139)
2020-03-25T19:33:20.820015+00:00 app[web.1]: D, [2020-03-25T19:33:20.819919 #4] DEBUG -- : [166fbca2-682f-401f-8ced-bff86ef77a3c]   Cocktail Load (1.4ms)  SELECT "cocktails".* FROM "cocktails"
2020-03-25T19:33:20.846038+00:00 app[web.1]: D, [2020-03-25T19:33:20.845878 #4] DEBUG -- : [166fbca2-682f-401f-8ced-bff86ef77a3c]   ActiveStorage::Attachment Load (1.2ms)  SELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4  [["record_id", 1], ["record_type", "Cocktail"], ["name", "photo"], ["LIMIT", 1]]
2020-03-25T19:33:20.864386+00:00 app[web.1]: D, [2020-03-25T19:33:20.864267 #4] DEBUG -- : [166fbca2-682f-401f-8ced-bff86ef77a3c]   ActiveStorage::Blob Load (1.2ms)  SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
2020-03-25T19:33:20.890583+00:00 app[web.1]: I, [2020-03-25T19:33:20.890449 #4]  INFO -- : [166fbca2-682f-401f-8ced-bff86ef77a3c]   Rendered cocktails/index.html.erb within layouts/application (Duration: 74.8ms | Allocations: 18315)
2020-03-25T19:33:20.890835+00:00 app[web.1]: I, [2020-03-25T19:33:20.890752 #4]  INFO -- : [166fbca2-682f-401f-8ced-bff86ef77a3c] Completed 500 Internal Server Error in 77ms (ActiveRecord: 18.8ms | Allocations: 18724)
2020-03-25T19:33:20.891874+00:00 app[web.1]: F, [2020-03-25T19:33:20.891797 #4] FATAL -- : [166fbca2-682f-401f-8ced-bff86ef77a3c]
2020-03-25T19:33:20.891885+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c] ActionView::Template::Error (Must supply cloud_name in tag or in configuration):
2020-03-25T19:33:20.891889+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c]      8:     <div class="cards">
2020-03-25T19:33:20.891891+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c]      9:
2020-03-25T19:33:20.891892+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c]     10:       <% @cocktails.each do |cocktail| %>
2020-03-25T19:33:20.891893+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c]     11:         <div class="card-index" style="background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('<%= cl_image_path cocktail.photo.key, height: 300, width: 400, crop: :fill %>')">
2020-03-25T19:33:20.891894+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c]     12:           <p class="cocktail-name"><%= link_to cocktail.name, cocktail_path(cocktail), class: "cocktail-link" %></p>
2020-03-25T19:33:20.891895+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c]     13:         </div>
2020-03-25T19:33:20.891895+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c]     14:       <% end %>
2020-03-25T19:33:20.891896+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c]
2020-03-25T19:33:20.891897+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c] app/views/cocktails/index.html.erb:11
2020-03-25T19:33:20.891897+00:00 app[web.1]: [166fbca2-682f-401f-8ced-bff86ef77a3c] app/views/cocktails/index.html.erb:10
2020-03-25T19:33:20.896214+00:00 heroku[router]: at=info method=GET path="/" host=mister-cocktail-marc7.herokuapp.com request_id=166fbca2-682f-401f-8ced-bff86ef77a3c fwd="79.37.123.217" dyno=web.1 connect=0ms service=84ms status=500 bytes=1827 protocol=https
2020-03-25T19:33:21.084167+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mister-cocktail-marc7.herokuapp.com request_id=52c3bb0e-efc5-491c-a402-8336ed67bf40 fwd="79.37.123.217" dyno=web.1 connect=0ms service=2ms status=304 bytes=48 protocol=https

...