railsアプリをHerokuでデプロイしたい
rails初心者です。
作成したrailsアプリをデプロイしたいのですが、最後にURLをブラウザに打ち込むとエラーメッセージが表示されます。
ターミナル上ではエラーは出てきませんでした。
また、ローカルでは正常に表示されます。
原因や対処法がわかる方がいれば教えていただきたいで
エラーメッセージ
We're sorry, but something went wrong. If you are the application owner check the logs for more information.
Gemfile
ruby
1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.5.0' 5 6# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 7gem 'rails', '~> 5.2.3' 8# Use sqlite3 as the database for Active Record 9#gem 'sqlite3' 10# Use Puma as the app server 11gem 'puma', '~> 3.11' 12# Use SCSS for stylesheets 13gem 'sass-rails', '~> 5.0' 14# Use Uglifier as compressor for JavaScript assets 15gem 'uglifier', '>= 1.3.0' 16# See https://github.com/rails/execjs#readme for more supported runtimes 17# gem 'mini_racer', platforms: :ruby 18 19# Use CoffeeScript for .coffee assets and views 20gem 'coffee-rails', '~> 4.2' 21# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 22gem 'turbolinks', '~> 5' 23# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 24gem 'jbuilder', '~> 2.5' 25# Use Redis adapter to run Action Cable in production 26# gem 'redis', '~> 4.0' 27# Use ActiveModel has_secure_password 28# gem 'bcrypt', '~> 3.1.7' 29 30# Use ActiveStorage variant 31# gem 'mini_magick', '~> 4.8' 32 33# Use Capistrano for deployment 34# gem 'capistrano-rails', group: :development 35 36# Reduces boot times through caching; required in config/boot.rb 37gem 'bootsnap', '>= 1.1.0', require: false 38 39group :development, :test do 40 # Call 'byebug' anywhere in the code to stop execution and get a debugger console 41 gem 'sqlite3' 42 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] 43end 44 45group :development do 46 # Access an interactive console on exception pages or by calling 'console' anywhere in the code. 47 gem 'web-console', '>= 3.3.0' 48 gem 'listen', '>= 3.0.5', '< 3.2' 49 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 50 gem 'spring' 51 gem 'spring-watcher-listen', '~> 2.0.0' 52end 53 54group :test do 55 # Adds support for Capybara system testing and selenium driver 56 gem 'capybara', '>= 2.15' 57 gem 'selenium-webdriver' 58 # Easy installation and use of chromedriver to run system tests with Chrome 59 gem 'chromedriver-helper' 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 65group :production do 66 gem 'pg' 67end 68 69gem 'rails_12factor' 70 71``` 72 73 74### 試したこと 75 76 77・Gemfileのgem 'sqlite3'をコメントアウト 78・Gemfileのgroup :development, :test do〜endの間に gem 'sqlite3'を記述 79・Gemfileにgem 'rails_12factor'を追加する 80・Gemfileに 81 group :production do 82 gem 'pg' 83 end 84を追加する 85・bundle installする 86・heroku run rails db:migrateでデータベースの更新をする 87・heroku pg:reset DATABASE からのheroku run rails db:migrateする 88 89 90### 参考URL 91https://qiita.com/kazukimatsumoto/items/a0daa7281a3948701c39#gemfile%E3%81%AE%E8%A8%AD%E5%AE%9A 92 93https://teratail.com/questions/84556
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/09/04 13:48