前提・実現したいこと
railチュートリアルでサンプルアプリを作っています。
まず,herokuにデプロイ出来るかどうかを確かめようと,デプロイをしたら下のようなエラーが発生しました
発生している問題・エラーメッセージ
! ! Could not detect rake tasks ! ensure you can run `$ bundle exec rake -P` against your app ! and using the production group of your Gemfile. ! /tmp/build_9c1fa3a7/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) ! from /tmp/build_9c1fa3a7/config/boot.rb:4:in `<top (required)>' ! from /tmp/build_9c1fa3a7/bin/rake:7:in `require_relative' ! from /tmp/build_9c1fa3a7/bin/rake:7:in `<main>' !
該当のソースコード
-----> Building on the Heroku-20 stack ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. Detected buildpacks: Ruby,Node.js See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order -----> Ruby app detected -----> Installing bundler 2.1.4 -----> Removing BUNDLED WITH version in the Gemfile.lock -----> Compiling Ruby/Rails -----> Using Ruby version: ruby-2.6.6 -----> Installing dependencies using bundler 2.1.4 Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 The dependency byebug (= 11.0.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x86_64-darwin-19 but the dependency is only for ruby, x86-mingw32, x64-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform ruby x86-mingw32 x64-mingw32`. The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for x86_64-darwin-19 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/............ Fetching rake 12.3.3 Installing rake 12.3.3 Fetching concurrent-ruby 1.1.8 Fetching thread_safe 0.3.6 Fetching minitest 5.11.3 Installing minitest 5.11.3 Installing thread_safe 0.3.6 Installing concurrent-ruby 1.1.8 Fetching zeitwerk 2.4.2 Installing zeitwerk 2.4.2 Fetching builder 3.2.4 Fetching erubi 1.10.0 Installing builder 3.2.4 Installing erubi 1.10.0 Fetching racc 1.5.2 Fetching crass 1.0.6 Installing racc 1.5.2 with native extensions Installing crass 1.0.6 Fetching rack 2.2.3 Installing rack 2.2.3 Fetching nio4r 2.5.5 Installing nio4r 2.5.5 with native extensions Fetching websocket-extensions 0.1.5 Installing websocket-extensions 0.1.5 Fetching mimemagic 0.3.5 Installing mimemagic 0.3.5 Fetching mini_mime 1.0.2 Installing mini_mime 1.0.2 Using bundler 2.1.4 Fetching ffi 1.14.2 Installing ffi 1.14.2 with native extensions Fetching method_source 1.0.0 Installing method_source 1.0.0 Fetching pg 1.1.4 Installing pg 1.1.4 with native extensions Fetching thor 1.1.0 Installing thor 1.1.0 Fetching rb-fsevent 0.10.4 Installing rb-fsevent 0.10.4 Fetching tilt 2.0.10 Installing tilt 2.0.10 Fetching turbolinks-source 5.2.0 Installing turbolinks-source 5.2.0 Fetching tzinfo 1.2.9 Installing tzinfo 1.2.9 Fetching i18n 1.8.9 Installing i18n 1.8.9 Fetching rack-test 1.1.0 Installing rack-test 1.1.0 Fetching rack-proxy 0.6.5 Installing rack-proxy 0.6.5 Fetching sprockets 3.7.2 Installing sprockets 3.7.2 Fetching websocket-driver 0.7.3 Installing websocket-driver 0.7.3 with native extensions Fetching marcel 0.3.3 Installing marcel 0.3.3 Fetching mail 2.7.1 Installing mail 2.7.1 Fetching puma 4.3.6 Installing puma 4.3.6 with native extensions Fetching nokogiri 1.11.1 (x86_64-linux) Installing nokogiri 1.11.1 (x86_64-linux) Fetching turbolinks 5.2.0 Installing turbolinks 5.2.0 Fetching activesupport 6.0.3 Installing activesupport 6.0.3 Fetching rb-inotify 0.10.1 Installing rb-inotify 0.10.1 Fetching loofah 2.9.0 Fetching rails-dom-testing 2.0.3 Installing loofah 2.9.0 Installing rails-dom-testing 2.0.3 Fetching globalid 0.4.2 Fetching activemodel 6.0.3 Installing globalid 0.4.2 Installing activemodel 6.0.3 Fetching jbuilder 2.9.1 Installing jbuilder 2.9.1 Fetching sass-listen 4.0.0 Installing sass-listen 4.0.0 Fetching rails-html-sanitizer 1.3.0 Installing rails-html-sanitizer 1.3.0 Fetching activejob 6.0.3 Installing activejob 6.0.3 Fetching activerecord 6.0.3 Installing activerecord 6.0.3 Fetching actionview 6.0.3 Installing actionview 6.0.3 Fetching sass 3.7.4 Installing sass 3.7.4 Fetching actionpack 6.0.3 Installing actionpack 6.0.3 Fetching actioncable 6.0.3 Fetching activestorage 6.0.3 Installing actioncable 6.0.3 Installing activestorage 6.0.3 Fetching actionmailer 6.0.3 Installing actionmailer 6.0.3 Fetching railties 6.0.3 Fetching sprockets-rails 3.2.2 Installing sprockets-rails 3.2.2 Installing railties 6.0.3 Fetching actionmailbox 6.0.3 Installing actionmailbox 6.0.3 Fetching actiontext 6.0.3 Installing actiontext 6.0.3 Fetching rails 6.0.3 Fetching sass-rails 5.1.0 Installing rails 6.0.3 Installing sass-rails 5.1.0 Fetching webpacker 4.0.7 Installing webpacker 4.0.7 Bundle complete! 22 Gemfile dependencies, 57 gems now installed. Gems in the groups development and test were not installed. Bundled gems are installed into `./vendor/bundle` Post-install message from sass: Ruby Sass has reached end-of-life and should no longer be used. * If you use Sass as a command-line tool, we recommend using Dart Sass, the new primary implementation: https://sass-lang.com/install * If you use Sass as a plug-in for a Ruby web framework, we recommend using the sassc gem: https://github.com/sass/sassc-ruby#readme * For more details, please refer to the Sass blog: https://sass-lang.com/blog/posts/7828841 Bundle completed (29.33s) Cleaning up the bundler cache. -----> Installing node-v12.16.2-linux-x64 -----> Installing yarn-v1.22.4 -----> Detecting rake tasks ! ! Could not detect rake tasks ! ensure you can run `$ bundle exec rake -P` against your app ! and using the production group of your Gemfile. ! /tmp/build_9c1fa3a7/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) ! from /tmp/build_9c1fa3a7/config/boot.rb:4:in `<top (required)>' ! from /tmp/build_9c1fa3a7/bin/rake:7:in `require_relative' ! from /tmp/build_9c1fa3a7/bin/rake:7:in `<main>' ! /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/rake_runner.rb:106:in `load_rake_tasks!': Could not detect rake tasks (LanguagePack::Helpers::RakeRunner::CannotLoadRakefileError) ensure you can run `$ bundle exec rake -P` against your app and using the production group of your Gemfile. /tmp/build_9c1fa3a7/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) from /tmp/build_9c1fa3a7/config/boot.rb:4:in `<top (required)>' from /tmp/build_9c1fa3a7/bin/rake:7:in `require_relative' from /tmp/build_9c1fa3a7/bin/rake:7:in `<main>' . . 同様の内容なので省略 . /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/bin/support/ruby_compile:15:in `<main>' ! Push rejected, failed to compile Ruby app. ! Push failed
補足情報(FW/ツールのバージョンなど)
rails 6.0.3
あなたの回答
tips
プレビュー