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

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

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

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

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

Q&A

0回答

245閲覧

heroku application errorについて

退会済みユーザー

退会済みユーザー

総合スコア0

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Ruby on Rails

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

0グッド

0クリップ

投稿2021/02/17 14:28

ブラウザからURLを開こうとすると、application erroが出てしまします。
ターミナルでheroku run rails cを実行すると、

Running rails c on ⬢ myapp2525... up, run.9017 (Free) Traceback (most recent call last): 91: from /app/bin/rails:9:in `<main>' 90: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 89: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 88: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-oad_path_cache/core_ext/kernel_require.rb:23:in `require' 20: from /app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.5/lib/active_record/base.rb:27:in `<main>' 19: from /app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.5/lib/active_record/base.rb:327:in `<module:ActiveRecord>' 18: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.5/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks' 17: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.5/lib/active_support/lazy_load_hooks.rb:51:in `each' 16: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.5/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks' 15: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.5/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook' 14: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.5/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control' 13: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.5/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook' 12: from /app/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.5/lib/active_support/lazy_load_hooks.rb:71:in `class_eval' 11: from /app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.5/lib/active_record/railtie.rb:201:in `block (2 levels) in <class:Railtie>' 10: from /app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.5/lib/active_record/connection_handling.rb:51:in `establish_connection' 9: from /app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:1052:in `establish_connection' 8: from /app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.5/lib/active_record/connection_adapters/connection_specification.rb:169:in `spec' 7: from /app/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require' 6: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' 5: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' 4: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 3: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' 2: from /app/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' 1: from /app/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.5/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `<main>' /app/vendor/bundle/ruby/2.6.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:346:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? sqlite3 is not part of the bundle. Add it to your Gemfile. (LoadError)

gemgileのLoadErrorが出てしまいます。

gemfileの中身は

source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.6.5' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 6.0.3', '>= 6.0.3.3' # Use sqlite3 as the database for Active Record #gem 'sqlite3', '~> 1.4' # Use Puma as the app server gem 'puma', '~> 4.1' # Use SCSS for stylesheets gem 'sass-rails', '>= 6' # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker gem 'webpacker', '~> 4.0' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.7' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use Active Model has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Active Storage variant # gem 'image_processing', '~> 1.2' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.2', require: false group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] gem 'sqlite3' end group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '~> 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end group :test do # Adds support for Capybara system testing and selenium driver gem 'capybara', '>= 2.15' gem 'selenium-webdriver' # Easy installation and use of web drivers to run system tests with browsers gem 'webdrivers' end group :production do gem 'pg', '0.20.0' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem "haml-rails", ">= 1.0", '<= 2.0.1'

このようになっています。

# SQLite. Versions 3.8.0 and up are supported. # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' # default: &default adapter: sqlite3 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> timeout: 5000 development: <<: *default database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: <<: *default database: db/test.sqlite3 production: <<: *default adapter: postgresql database: db/production.pg

database.ymlはこのようにしています。

仮説
sql3が誤作動を起こしているように思われます。
どなたかご教授お願い致します。

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

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

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

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

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

hoshi-takanori

2021/02/21 04:34

heroku では sqlite ではなく postgresql を使うべきでは。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.47%

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

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

質問する

関連した質問