railsチュートリアルの3章目でherokuにpushするところでエラーが出ました。
環境は、
mac
ruby 2.7.2
Rails 6.0.3
Bundler version 2.2.4
クラウドIDE(Cloud9)を使わず自分のローカル開発環境で行っています
エラーのログです
Enumerating objects: 119, done. Counting objects: 100% (119/119), done. Delta compression using up to 4 threads Compressing objects: 100% (101/101), done. Writing objects: 100% (119/119), 69.32 KiB | 3.01 MiB/s, done. Total 119 (delta 10), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. remote: Detected buildpacks: Ruby,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> Ruby app detected remote: -----> Installing bundler 2.1.4 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.6.6 remote: -----> Installing dependencies using bundler 2.1.4 remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 remote: 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`. remote: 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`. -------------省略してます remote: Bundle complete! 23 Gemfile dependencies, 59 gems now installed. remote: Gems in the groups development and test were not installed. remote: Bundled gems are installed into `./vendor/bundle` remote: Post-install message from i18n: remote: remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. remote: But that may break your application. remote: remote: If you are upgrading your Rails application from an older version of Rails: remote: remote: Please check your Rails app for 'config.i18n.fallbacks = true'. remote: If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be remote: 'config.i18n.fallbacks = [I18n.default_locale]'. remote: If not, fallbacks will be broken in your app by I18n 1.1.x. remote: remote: If you are starting a NEW Rails application, you can ignore this notice. remote: remote: For more info see: remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 remote: remote: Post-install message from sass: remote: remote: Ruby Sass has reached end-of-life and should no longer be used. remote: remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new remote: primary implementation: https://sass-lang.com/install remote: remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the remote: sassc gem: https://github.com/sass/sassc-ruby#readme remote: remote: * For more details, please refer to the Sass blog: remote: https://sass-lang.com/blog/posts/7828841 remote: remote: Bundle completed (38.46s) remote: Cleaning up the bundler cache. remote: -----> Installing node-v12.16.2-linux-x64 remote: -----> Installing yarn-v1.22.4 remote: -----> Detecting rake tasks remote: remote: ! remote: ! Could not detect rake tasks remote: ! ensure you can run `$ bundle exec rake -P` against your app remote: ! and using the production group of your Gemfile. remote: ! /tmp/build_d2dc1212/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) remote: ! from /tmp/build_d2dc1212/config/boot.rb:4:in `<top (required)>' remote: ! from /tmp/build_d2dc1212/bin/rake:7:in `require_relative' remote: ! from /tmp/build_d2dc1212/bin/rake:7:in `<main>' remote: ! remote: /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) remote: ensure you can run `$ bundle exec rake -P` against your app remote: and using the production group of your Gemfile. remote: /tmp/build_d2dc1212/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError) ----------------------省略してます remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: a1235217290f0a8ba72a75e0973f8f48ef561204 remote: ! remote: ! We have detected that you have triggered a build from source code with version a1235217290f0a8ba72a75e0973f8f48ef561204 remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch. remote: ! remote: ! If you are developing on a branch and deploying via git you must run: remote: ! remote: ! git push heroku <branchname>:main remote: ! remote: ! This article goes into details on the behavior: remote: ! https://devcenter.heroku.com/articles/duplicate-build-version remote: remote: Verifying deploy... remote: remote: ! Push rejected to gentle-taiga-38886. remote: To https://git.heroku.com/taiga-38886.git ! [remote rejected] main -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/taiga-38886.git'
いろいろ調べてみたのですがよくわからなので教えていただきたいです。。。
ログに出ているRuby versionとbundler versionが自分のローカル開発環境と違うのもおかしいのでしょうか?
remote: -----> Using Ruby version: ruby-2.6.6 remote: -----> Installing dependencies using bundler 2.1.4
ちなみにgemfileはこんな感じです
source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem 'rails', '6.0.3' gem 'puma', '4.3.6' gem 'sass-rails', '5.1.0' gem 'webpacker', '4.0.7' gem 'turbolinks', '5.2.0' gem 'jbuilder', '2.9.1' gem 'bootsnap', '1.4.5', require: false group :development, :test do gem 'sqlite3', '1.4.1' gem 'byebug', '11.0.1', platforms: [:mri, :mingw, :x64_mingw] end group :development do gem 'web-console', '4.0.1' gem 'listen', '3.1.5' gem 'spring', '2.1.0' gem 'spring-watcher-listen', '2.0.1' end group :test do gem 'capybara', '3.28.0' gem 'selenium-webdriver', '3.142.4' gem 'webdrivers', '4.1.2' gem 'rails-controller-testing', '1.0.4' gem 'minitest', '5.11.3' gem 'minitest-reporters', '1.3.8' gem 'guard', '2.16.2' gem 'guard-minitest', '2.4.6' end group :production do gem 'pg', '1.1.4' end # Windows ではタイムゾーン情報用の tzinfo-data gem を含める必要があります gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
あなたの回答
tips
プレビュー