前提
オリジナルのアプリケーションを作ったあと、herokuにデプロイしたのですが、Application Errorが出て解決できません。
Rails 6.0.3.5
ruby 2.6.5
エラー文
Terminal
1% heroku logs -t 2. 3. 4. 52021-04-01T03:59:17.481099+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.2.5/lib/redis/client.rb:367:in `rescue in establish_connection': Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED) (Redis::CannotConnectError) 62021-04-01T03:59:17.481103+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.6.0/gems/redis-4.2.5/lib/redis/client.rb:348:in `establish_connection' 7. 8. 9. 10#省略 11. 12. 13. 142021-04-01T03:59:17.692297+00:00 heroku[web.1]: State changed from up to crashed 152021-04-01T03:59:22.552408+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sports-blogs.herokuapp.com request_id=4bf48790-530c-46d8-aaae-eed619a680db fwd="126.99.229.42" dyno= connect= service= status=503 bytes= protocol=https 162021-04-01T03:59:22.570959+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sports-blogs.herokuapp.com request_id=7d0d1b14-f206-43c3-8926-ceb8fbd76506 fwd="126.99.229.42" dyno= connect= service= status=503 bytes= protocol=https 172021-04-01T03:59:22.629772+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sports-blogs.herokuapp.com request_id=6ca6af83-cbdc-4174-8dd0-6a763e59c980 fwd="126.99.229.42" dyno=web.1 connect=5001ms service= status=503 bytes= protocol=https 182021-04-01T03:59:23.067751+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sports-blogs.herokuapp.com request_id=b7107dad-b6db-4cba-87a6-94b07d87dbde fwd="126.99.229.42" dyno= connect= service= status=503 bytes= protocol=https
試したこと
https://github.com/bodrovis/Sitepoint-source/issues/16
方法としてはいまいちしっかりした情報が他に載っておらず、こちらを参考にやってみたのですが全然変わらず困っています。
ソースコード
config/cable.yml
development: # adapter: redis # url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> # channel_prefix: sports_junkies_development adapter: async test: adapter: test production: adapter: redis url: <%= ENV["REDISCLOUD_URL"] %> # <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> channel_prefix: sports_junkies_production
Gemfileもとりあえず載せておきます。
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.0' # Use mysql as the database for Active Record gem 'mysql2', '>= 0.4.4' # Use Puma as the app server gem 'puma', '~> 3.11' # Use SCSS for stylesheets gem 'sass-rails', '~> 5' # 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 gem 'redis', '~> 4.0' 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] 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.0.5', '< 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' gem 'rspec-rails', '~> 4.0.0' gem 'factory_bot_rails' gem 'faker' end group :production do gem 'unicorn', '5.4.1' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem 'devise' gem 'pry-rails' gem 'mini_magick' gem 'image_processing', '~> 1.2' gem 'acts-as-taggable-on', '~> 7.0' gem 'bootstrap', '~> 5.0.0.beta1' gem "optimism", "~> 0.4.1" gem "aws-sdk-s3", require: false
どなたか解決方法わかる方いらっしゃいましたらぜひアドバイスの方よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。