railsチュートリアルの中でherokuへのプッシュができませんでした。
エラー文
Failed to install gems via Bundler.
色々検索をしてHeroku環境のbundlerのversionとローカル環境のbundlerのversionを一致させました。
データベースはpostgresqlを使用しています。
エラー分になります。
Enumerating objects: 107, done. Counting objects: 100% (107/107), done. Delta compression using up to 4 threads Compressing objects: 100% (88/88), done. Writing objects: 100% (107/107), 153.96 KiB | 5.13 MiB/s, done. Total 107 (delta 3), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Determining which buildpack to use for this app 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.2.11 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.7.2 remote: -----> Installing dependencies using bundler 2.2.11 remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 remote: Your bundle only supports platforms ["x86_64-darwin-20"] but your local platform remote: is x86_64-linux. Add the current platform to the lockfile with `bundle lock remote: --add-platform x86_64-linux` and try again. remote: Bundler Output: Your bundle only supports platforms ["x86_64-darwin-20"] but your local platform remote: is x86_64-linux. Add the current platform to the lockfile with `bundle lock remote: --add-platform x86_64-linux` and try again. remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! remote: ! Push rejected, failed to compile Ruby app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to polar-citadel-62109. remote: To https://git.heroku.com/polar-citadel-62109.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/polar-citadel-62109.git'
gemfileです。
source
1git_source(:github) { |repo| "https://github.com/#{repo}.git" } 2 3ruby "2.7.2" 4 5# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' 6gem "rails", "~> 6.1.3", ">= 6.1.3.1" 7# Use postgresql as the database for Active Record 8# Use Puma as the app server 9gem "puma", "~> 5.0" 10# Use SCSS for stylesheets 11gem "sass-rails", ">= 6" 12# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker 13gem "webpacker", "~> 5.0" 14# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 15gem "turbolinks", "~> 5" 16# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 17gem "jbuilder", "~> 2.7" 18# Use Redis adapter to run Action Cable in production 19# gem 'redis', '~> 4.0' 20# Use Active Model has_secure_password 21# gem 'bcrypt', '~> 3.1.7' 22 23# Use Active Storage variant 24# gem 'image_processing', '~> 1.2' 25 26# Reduces boot times through caching; required in config/boot.rb 27gem "bootsnap", ">= 1.4.4", require: false 28 29group :development, :test do 30 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 31 gem "byebug", platforms: [:mri, :mingw, :x64_mingw] 32end 33 34group :development do 35 # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 36 gem "web-console", ">= 4.1.0" 37 # Display performance information such as SQL time and flame graphs for each request in your browser. 38 # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md 39 gem "rack-mini-profiler", "~> 2.0" 40 gem "listen", "~> 3.3" 41 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 42 gem "spring" 43end 44 45group :test do 46 # Adds support for Capybara system testing and selenium driver 47 gem "capybara", ">= 3.26" 48 gem "selenium-webdriver" 49 # Easy installation and use of web drivers to run system tests with browsers 50 gem "webdrivers" 51end 52 53group :production do 54 gem "pg" 55end 56 57# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 58gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。