質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.49%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

1184閲覧

デプロイできません (Railsチュートリアル第1章において)

y.xx.d

総合スコア18

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2020/08/25 14:01

編集2020/08/25 14:03

Railsを現在勉強しており、Railsチュートリアル第一章を進めているのでが、
herokuへのデプロイの際、git push heroku masterを入力後にエラーが表示され、
デプロイできなくなってしまいました。
Qiita等も参考にしたのですが、解決できませんでした。

宜しくお願いいたします。

エラー remote: ! remote: ! Failed to install gems via Bundler. remote: ! Detected sqlite3 gem which is not supported on Heroku: remote: ! https://devcenter.heroku.com/articles/sqlite3 remote: !

Gemfile

1 2source 'https://rubygems.org' 3git_source(:github) { |repo| "https://github.com/#{repo}.git" } 4 5ruby '2.6.3' 6 7# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 8gem 'rails', '~> 6.0.3' 9# Use sqlite3 as the database for Active Record 10gem 'sqlite3', '~> 1.4' 11# Use Puma as the app server 12gem 'puma', '~> 3.11' 13# Use SCSS for stylesheets 14gem 'sass-rails', '~> 5' 15# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker 16gem 'webpacker', '~> 4.0' 17# Turbolinks makes navigating your web application faster. 18# Read more: https://github.com/turbolinks/turbolinks 19gem 'turbolinks', '~> 5' 20# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 21gem 'jbuilder', '~> 2.7' 22# Use Redis adapter to run Action Cable in production 23# gem 'redis', '~> 4.0' 24# Use Active Model has_secure_password 25# gem 'bcrypt', '~> 3.1.7' 26 27# Use Active Storage variant 28# gem 'image_processing', '~> 1.2' 29 30# Reduces boot times through caching; required in config/boot.rb 31gem 'bootsnap', '>= 1.4.2', require: false 32 33group :development, :test do 34 # Call 'byebug' anywhere in the code to stop execution and get a 35 # debugger console 36 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 37end 38 39group :development do 40 # Access an interactive console on exception pages or by calling 'console' 41 # anywhere in the code. 42 gem 'web-console', '>= 3.3.0' 43 gem 'listen', '>= 3.0.5', '< 3.2' 44 # Spring speeds up development by keeping your application running in the 45 # background. Read more: https://github.com/rails/spring 46 gem 'spring' 47 gem 'spring-watcher-listen', '~> 2.0.0' 48end 49 50group :test do 51 # Adds support for Capybara system testing and selenium driver 52 gem 'capybara', '>= 2.15' 53 gem 'selenium-webdriver' 54 # Easy installation and use of web drivers to run system tests with browsers 55 gem 'webdrivers' 56end 57 58group :production do 59 gem 'pg', '1.1.4' 60end 61 62# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 63gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 64 65

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

Gemfile を次のように編集します

diff

1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.6.3' 5 6# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 7gem 'rails', '~> 6.0.3' 8- # Use sqlite3 as the database for Active Record 9- gem 'sqlite3', '~> 1.4' 10# Use Puma as the app server 11gem 'puma', '~> 3.11' 12# Use SCSS for stylesheets 13gem 'sass-rails', '~> 5' 14# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker 15gem 'webpacker', '~> 4.0' 16# Turbolinks makes navigating your web application faster. 17# Read more: https://github.com/turbolinks/turbolinks 18gem 'turbolinks', '~> 5' 19# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 20gem 'jbuilder', '~> 2.7' 21# Use Redis adapter to run Action Cable in production 22# gem 'redis', '~> 4.0' 23# Use Active Model has_secure_password 24# gem 'bcrypt', '~> 3.1.7' 25 26# Use Active Storage variant 27# gem 'image_processing', '~> 1.2' 28 29# Reduces boot times through caching; required in config/boot.rb 30gem 'bootsnap', '>= 1.4.2', require: false 31 32group :development, :test do 33 # Call 'byebug' anywhere in the code to stop execution and get a 34 # debugger console 35 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 36+ # Use sqlite3 as the database for Active Record 37+ gem 'sqlite3', '~> 1.4' 38end 39 40group :development do 41 # Access an interactive console on exception pages or by calling 'console' 42 # anywhere in the code. 43 gem 'web-console', '>= 3.3.0' 44 gem 'listen', '>= 3.0.5', '< 3.2' 45 # Spring speeds up development by keeping your application running in the 46 # background. Read more: https://github.com/rails/spring 47 gem 'spring' 48 gem 'spring-watcher-listen', '~> 2.0.0' 49end 50 51group :test do 52 # Adds support for Capybara system testing and selenium driver 53 gem 'capybara', '>= 2.15' 54 gem 'selenium-webdriver' 55 # Easy installation and use of web drivers to run system tests with browsers 56 gem 'webdrivers' 57end 58 59group :production do 60 gem 'pg', '1.1.4' 61end 62 63# Windows does not include zoneinfo files, so bundle the tzinfo-data gem 64gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

投稿2020/08/25 14:29

y_shinoda

総合スコア3272

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

y.xx.d

2020/08/26 01:44

sqlite3はあくまで開発環境のgemということだったんですね! 回答通り修正後、無事にHerokuへプッシュすることができました! お時間割いていただき、ご回答ありがとうございました! 以後頑張ります!!!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.49%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問