Heroku: błąd podczas deploy


#1

Potrzebuję pomocy przy deploy’u nowej apki na Heroku. Być może ktoś z Was podsunie jakiś pomysł.

Ruby: 2.4.0 / próbowałem też z 2.6.1 bo na stacku ktoś sugerował upgrade właśnie do tej wersji.
Rails: 5.2.3

Wszystko idzie dobrze do momentu zakończenia instalacji wszystkich gemów:

remote: Bundle completed (165.31s)
remote: Cleaning up the bundler cache.
remote: -----> Installing node-v10.15.3-linux-x64
remote: -----> Detecting rake tasks
remote:
remote: !
remote: ! Could not detect rake tasks
remote: ! ensure you can run$ bundle exec rake -Pagainst your app
remote: ! and using the production group of your Gemfile.
remote: ! Activating bundler (2.0.1) failed:
remote: ! Could not find 'bundler' (= 2.0.1) - did find: [bundler-2.0.2]
remote: ! Checked in 'GEM_PATH=vendor/bundle/ruby/2.4.0', executegem envfor more information
remote: !
remote: ! To install the version of bundler this project requires, run "gem install bundler -v '2.0.1'"
remote: !
remote: /app/tmp/buildpacks/b7af5642714be4eddaa5f35e2b4c36176b839b4abcd9bfe57ee71c358d71152b4fd2cf925c5b6e6816adee359c4f0f966b663a7f8649b0729509d510091abc07/lib/language_pack/helpers/rake_runner.rb:106:in 'load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError)
remote: ensure you can run$ bundle exec rake -Pagainst your app
remote: and using the production group of your Gemfile.
remote: Activating bundler (2.0.1) failed:
remote: Could not find 'bundler' (= 2.0.1) - did find: [bundler-2.0.2]
remote: Checked in 'GEM_PATH=vendor/bundle/ruby/2.4.0', executegem envfor more information

Dodam, że bundler -v wskazuje na Bundler version 2.0.1


#2

Zupdatuj bundlera do 2.0.2 w gemfilach


#3

Teraz są inne błędy:

git push heroku master

Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 585 bytes | 585.00 KiB/s, done.
Total 5 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Rake app detected
remote: rake aborted!
remote: LoadError: cannot load such file -- bundler/setup
remote: /tmp/build_7852350a661d0da59c96dfb8f01c0e07/config/boot.rb:3:in `<top (required)>'
remote: /tmp/build_7852350a661d0da59c96dfb8f01c0e07/config/application.rb:1:in `require_relative'
remote: /tmp/build_7852350a661d0da59c96dfb8f01c0e07/config/application.rb:1:in `<top (required)>'
remote: /tmp/build_7852350a661d0da59c96dfb8f01c0e07/Rakefile:4:in `require_relative'
remote: /tmp/build_7852350a661d0da59c96dfb8f01c0e07/Rakefile:4:in `<top (required)>'
remote: (See full trace by running task with --trace)
remote:  !     Push rejected, failed to compile Rake app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !	Push rejected to remojobs.
remote: 
To https://git.heroku.com/sampleapp-miro.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sampleapp-miro.git'

Używam Ruby 2.4.0, Rails 5.2.3. Bundler 2.0.2.

Poniżej pełne błędy z Heroku logs:

2019-06-29T18:04:32.000000+00:00 app[api]: Build started by user info@myemail.com
2019-06-29T18:04:34.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/8a339527-87e4-40c9-bee5-326119c29f60/activity/builds/a430cb9b-857a-4764-9abc-cefd14e45caf
2019-06-29T18:08:37.167236+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=sampleapp-miro.herokuapp.com request_id=f2ff0cfa-9faa-46d8-81c2-cd8c200fdc8a fwd="195.136.56.0" dyno= connect= service= status=503 bytes= protocol=https
2019-06-29T18:08:41.059684+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=sampleapp-miro.herokuapp.com request_id=456e9d84-7286-4b75-8a7d-50e397b9b8be fwd="195.136.56.0" dyno= connect= service= status=503 bytes= protocol=https
2019-06-29T18:09:09.000000+00:00 app[api]: Build started by user info@myemail.com
2019-06-29T18:09:10.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/8a339527-87e4-40c9-bee5-326119c29f60/activity/builds/c596ea0f-4936-45e1-a415-517178338c70
2019-06-29T18:13:26.000000+00:00 app[api]: Build started by user info@myemail.com
2019-06-29T18:13:27.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/8a339527-87e4-40c9-bee5-326119c29f60/activity/builds/c78a0330-354f-4c1f-b04e-24418ab36b02
2019-06-29T18:14:42.000000+00:00 app[api]: Build started by user info@myemail.com
2019-06-29T18:14:43.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/8a339527-87e4-40c9-bee5-326119c29f60/activity/builds/29cfa1cd-6af1-4bcc-8b4d-825e9131043c
2019-06-29T18:15:32.000000+00:00 app[api]: Build started by user info@myemail.com
2019-06-29T18:15:33.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/8a339527-87e4-40c9-bee5-326119c29f60/activity/builds/43c3e880-6880-4cc8-b8b1-5184e7d66c86
2019-06-29T18:17:04.000000+00:00 app[api]: Build started by user info@myemail.com
2019-06-29T18:17:05.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/8a339527-87e4-40c9-bee5-326119c29f60/activity/builds/d10a1410-48e9-48d1-9400-43a1b4fa0ea1

#4

OK, udało mi się rozwiązać problem. Może komuś się to przyda, jeśli napotka podobny problem:

  • update Ruby do wersji 2.6.1
  • gem uninstall bundler i ponowna instalacja gem install bundler -v 2.0.2
  • usunięcie Gemfile.lock i bundle install
  • git push heroku master
  • działa :slight_smile: