herokuにデプロイできず詰まっています。
自分で色々と調べ、試したのですが解決せずどの様に解決したらいいのか分かりません...
現状は下記の通りです。
■スペック
・mac os
・Rails 6.0.3.4
・ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin19]
■試したこと
・コミットしていることを確認。
・herokuアプリを削除し、再度作り直しました。
・エラーメッセージにあるgit push heroku ブランチ名:mainコマンドを実行。
→git push heroku master:main
→git push heroku develop:main
どちらも同じエラーが出てデプロイできませんでした...
お手数おかけしますが、何卒よろしくお願いいたします。
■エラーメッセージ(git push heroku master後)
Enumerating objects: 9414, done. Counting objects: 100% (9414/9414), done. Delta compression using up to 8 threads Compressing objects: 100% (8045/8045), done. Writing objects: 100% (9414/9414), 31.47 MiB | 567.00 KiB/s, done. Total 9414 (delta 2551), reused 6930 (delta 849), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Node.js app detected remote: remote: -----> Creating runtime environment remote: remote: NPM_CONFIG_LOGLEVEL=error remote: USE_YARN_CACHE=true remote: NODE_ENV=production remote: NODE_MODULES_CACHE=true remote: NODE_VERBOSE=false remote: remote: -----> Installing binaries remote: engines.node (package.json): unspecified remote: engines.npm (package.json): unspecified (use default) remote: engines.yarn (package.json): unspecified (use default) remote: remote: Resolving node version 12.x... remote: Downloading and installing node 12.20.0... remote: Using default npm version: 6.14.8 remote: Resolving yarn version 1.22.x... remote: Downloading and installing yarn (1.22.10) remote: Installed yarn 1.22.10 remote: remote: -----> Installing dependencies remote: Installing node modules (yarn.lock) remote: yarn install v1.22.10 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@2.1.3: The platform "linux" is incompatible with this module. remote: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. remote: info fsevents@1.2.13: The platform "linux" is incompatible with this module. remote: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". remote: warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0". remote: [4/4] Building fresh packages... remote: Done in 34.94s. remote: remote: -----> Build remote: remote: -----> Pruning devDependencies remote: yarn install v1.22.10 remote: [1/4] Resolving packages... remote: [2/4] Fetching packages... remote: info fsevents@2.1.3: The platform "linux" is incompatible with this module. remote: info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. remote: info fsevents@1.2.13: The platform "linux" is incompatible with this module. remote: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. remote: [3/4] Linking dependencies... remote: warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". remote: warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0". remote: [4/4] Building fresh packages... remote: warning Ignored scripts due to flag. remote: Done in 6.71s. remote: remote: -----> Caching build remote: - yarn cache remote: remote: -----> Build succeeded! remote: ! Unmet dependencies don't fail yarn install but may cause runtime issues remote: https://github.com/npm/npm/issues/7494 remote: 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: /tmp/build_7d30a02c/bin/bundle:34:in `gemfile': undefined method `present?' for "/tmp/build_7d30a02c/Gemfile":String (NoMethodError) remote: from /tmp/build_7d30a02c/bin/bundle:41:in `lockfile' remote: from /tmp/build_7d30a02c/bin/bundle:49:in `lockfile_version' remote: from /tmp/build_7d30a02c/bin/bundle:58:in `bundler_version' remote: from /tmp/build_7d30a02c/bin/bundle:62:in `bundler_requirement' remote: from /tmp/build_7d30a02c/bin/bundle:89:in `activate_bundler' remote: from /tmp/build_7d30a02c/bin/bundle:78:in `load_bundler!' remote: from /tmp/build_7d30a02c/bin/bundle:102:in `<main>' remote: Bundler Output: /tmp/build_7d30a02c/bin/bundle:34:in `gemfile': undefined method `present?' for "/tmp/build_7d30a02c/Gemfile":String (NoMethodError) remote: from /tmp/build_7d30a02c/bin/bundle:41:in `lockfile' remote: from /tmp/build_7d30a02c/bin/bundle:49:in `lockfile_version' remote: from /tmp/build_7d30a02c/bin/bundle:58:in `bundler_version' remote: from /tmp/build_7d30a02c/bin/bundle:62:in `bundler_requirement' remote: from /tmp/build_7d30a02c/bin/bundle:89:in `activate_bundler' remote: from /tmp/build_7d30a02c/bin/bundle:78:in `load_bundler!' remote: from /tmp/build_7d30a02c/bin/bundle:102:in `<main>' 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 music-sns-app. remote: To https://git.heroku.com/music-sns-app.git ! [remote rejected] heroku_deploy_error -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/music-sns-app.git'
■heroku logs
Build failed -- check your build output:URL
gemfile
1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.6.6' 5 6gem 'rails', '~> 6.0.3', '>= 6.0.3.3' 7gem 'bcrypt' 8gem 'puma', '~> 4.1' 9gem 'sass-rails', '>= 6' 10gem 'webpacker', '~> 4.0' 11gem 'turbolinks', '~> 5' 12gem 'jbuilder', '~> 2.7' 13gem 'bootsnap', '>= 1.4.2', require: false 14gem 'bootstrap-sass' 15gem 'devise' 16gem 'faker' 17gem 'jquery-rails' 18gem 'will_paginate' 19gem 'bootstrap-will_paginate' 20 21group :development, :test do 22 gem "factory_bot_rails" 23 gem 'rubocop-airbnb' 24 gem 'rails-controller-testing' 25 gem 'rspec-rails' 26 gem 'sqlite3' 27 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 28end 29 30group :development do 31 gem 'spring-commands-rspec' 32 gem 'web-console', '>= 3.3.0' 33 gem 'listen', '~> 3.2' 34 gem 'spring' 35 gem 'spring-watcher-listen', '~> 2.0.0' 36end 37 38group :test do 39 gem 'webdrivers' 40 gem 'capybara', '>= 2.15' 41 gem 'selenium-webdriver' 42end 43 44group :production do 45 gem 'pg' 46end 47 48gem 'tzinfo-data'
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。