rails チュートリアル第1章にてherokuへpushしようとしたところ失敗しました。
TypeErrorで検索してみても、よくわからず止まってしまいました。
Build log
-----> Building on the Heroku-20 stack -----> Determining which buildpack to use for this app ! 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 1.17.3 -----> Removing BUNDLED WITH version in the Gemfile.lock -----> Compiling Ruby/Rails -----> Using Ruby version: ruby-3.0.3 -----> Installing dependencies using bundler 1.17.3 Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 BUNDLE_GLOBAL_PATH_APPENDS_RUBY_SCOPE=1 bundle install -j4 (文字数制限により省略) Bundle complete! 18 Gemfile dependencies, 58 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 (23.91s) Cleaning up the bundler cache. -----> Installing node-v16.13.1-linux-x64 -----> Installing yarn-v1.22.17 -----> 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. ! rake aborted! ! TypeError: wrong argument type false (expected Symbol) ! /tmp/build_a51a0b6f/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/iseq.rb:12:in `to_binary' ! /tmp/build_a51a0b6f/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/iseq.rb:12:in `input_to_storage' ! /tmp/build_a51a0b6f/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/iseq.rb:37:in `fetch' ! /tmp/build_a51a0b6f/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/iseq.rb:37:in `load_iseq' ! /tmp/build_a51a0b6f/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' (省略) ! /tmp/build_a51a0b6f/bin/rake:5:in `<main>' ! ! Caused by: ! Bootsnap::LoadPathCache::FallbackScan: ! /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/rake_runner.rb:100: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. rake aborted! TypeError: wrong argument type false (expected Symbol) /tmp/build_a51a0b6f/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/iseq.rb:12:in `to_binary' /tmp/build_a51a0b6f/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/iseq.rb:12:in `input_to_storage' /tmp/build_a51a0b6f/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/iseq.rb:37:in `fetch' (省略) Caused by: Bootsnap::LoadPathCache::FallbackScan: (文字数制限により省略) ! Push rejected, failed to compile Ruby app. ! Push failed
log
1 ! Could not detect rake tasks 2 ! ensure you can run `$ bundle exec rake -P` against your app 3 ! and using the production group of your Gemfile. 4 ! rake aborted! 5 ! TypeError: wrong argument type false (expected Symbol)
このあたりが怪しそうなのはなんとなく分かるのですが、これの原因と対処法が調べても分かりませんでした。
Rubyが3.0.3を実行してしまっていることが原因なのでしょうか?
.ruby-versionで2.6.8を指定しているのですが・・・
試したこと
Gemfile.lock
をリセットしてbundle install
を実行bundle exec rake -P
を実行しもう一度push
環境
WSL2 (Ubuntu 20.04.4)
Ruby 2.6.8
Ruby on Rails 6.1.4.1
ご教授いただければ幸いです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/03/09 02:41