ruby アプリをherokuでデプロイしようとgit push heroku masterするとエラーが出ます。
rubyのバージョンの関係でHeroku-20からheroku-18に落としています。
Your Gemfile lists the gem sqlite3 (>= 0) more than once.
You should probably keep only one of them.
と書かれていたので、gemfile確認してgem 'sqlite3'の記載が二行あったので消しました。
しかしエラー内容は変わりません
bundle installはうまくいっています。
原因がわかりません。
ご教授お願いします。
- ruby 2.5.1
- rails 5.2.3
- bundler 2.2.15
Gemfile
1ruby '2.5.1' 2 3gem 'rails', '~> 5.2.3' 4# gem 'sqlite3' 5gem 'puma', '~> 3.11' 6gem 'sass-rails', '~> 5.0' 7gem 'uglifier', '>= 1.3.0' 8gem 'coffee-rails', '~> 4.2' 9gem 'turbolinks', '~> 5' 10gem 'jbuilder', '~> 2.5' 11group :development, :test do 12 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 13end 14group :development do 15 gem 'web-console', '>= 3.3.0' 16 gem 'listen', '>= 3.0.5', '< 3.2' 17 gem 'spring' 18 gem 'spring-watcher-listen', '~> 2.0.0' 19end 20 21group :test do 22 gem 'selenium-webdriver' 23 gem 'chromedriver-helper' 24end 25gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 26gem 'font-awesome-sass' 27#デプロイ用 28gem 'sqlite3', group: [:development, :test]
ターミナル remote: -----> Installing bundler 2.2.16 remote: -----> Removing BUNDLED WITH version in the Gemfile.lock remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.5.1 remote: -----> Installing dependencies using bundler 2.2.16 remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 remote: Your Gemfile lists the gem sqlite3 (>= 0) more than once. remote: You should probably keep only one of them. remote: Remove any duplicate entries and specify the gem only once. remote: While it's not a problem now, it could cause errors if you change the version of one of them later. remote: Fetching gem metadata from https://rubygems.org/............ remote: Your bundle is locked to mimemagic (0.3.3) from rubygems repository remote: https://rubygems.org/ or installed locally, but that version can no longer be remote: found in that source. That means the author of mimemagic (0.3.3) has removed it. remote: You'll need to update your bundle to a version other than mimemagic (0.3.3) that remote: hasn't been removed in order to install. remote: Bundler Output: Your Gemfile lists the gem sqlite3 (>= 0) more than once. remote: You should probably keep only one of them. remote: Remove any duplicate entries and specify the gem only once. remote: While it's not a problem now, it could cause errors if you change the version of one of them later. remote: Fetching gem metadata from https://rubygems.org/............ remote: Your bundle is locked to mimemagic (0.3.3) from rubygems repository remote: https://rubygems.org/ or installed locally, but that version can no longer be remote: found in that source. That means the author of mimemagic (0.3.3) has removed it. remote: You'll need to update your bundle to a version other than mimemagic (0.3.3) that remote: hasn't been removed in order to install. remote: remote: ! remote: ! Failed to install gems via Bundler. remote: ! 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: e344d8d12487b25f1b4ff06e2b4de252b350f9b2 remote: ! remote: ! We have detected that you have triggered a build from source code with version e344d8d12487b25f1b4ff06e2b4de252b350f9b2 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 ryutanew. remote: To https://git.heroku.com/ryutanew.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/ryutanew.git' kobayashi-no-MacBook-Air:ryutanew MISIAN$ bundler -v Bundler version 2.2.15
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。