現在、herokuでRailsアプリ(ステージング環境)をブラウザで開くと、下記のように表示されてしまいます(本番環境は正常に表示されています)。
We're sorry, but something went wrong. If you are the application owner check the logs for more information.
調べてみると、rake db:migrateで解決したという情報がありましたので、下記のように試したところエラーが発生してしまいます。
herokuにステージング環境をつくり、heroku rake db:migrate --remote stagingをするという状況です。
heroku rake db:migrate --remote staging Running rake db:migrate on ⬢ icecreamer-staging... up, run.6435 (Free) DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /app/config/environments/production.rb:23) rake aborted! Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
エラーを見る限り、onfig.serve_static_assetsに問題があるようですが、知識が足らず理解できない状態です。
また、herokuではMySQLを使っているのですが、それについてのエラーも発生しているようです。
解決策がわからず悩んでおります。おわかりの方がいましたら、ご回答いただけますと幸いです。
よろしくお願い致します。
追記エラー
rake aborted! Mysql2::Error: Access denied for user 'b9e38df1e77681'@'ip-10-123-180-209.ec2.internal' (using password: YES)
追記コード
confing/database.yml
1 2# MySQL. Versions 4.1 and 5.0 are recommended. 3# 4# Install the MYSQL driver 5# gem install mysql2 6# 7# Ensure the MySQL gem is defined in your Gemfile 8# gem 'mysql2' 9# 10# And be sure to use new-style password hashing: 11# http://dev.mysql.com/doc/refman/5.0/en/old-client.html 12development: 13 adapter: mysql2 14 encoding: utf8 15 database: mooovi_development 16 pool: 5 17 username: root 18 password: 19 socket: /tmp/mysql.sock 20 21# Warning: The database defined as "test" will be erased and 22# re-generated from your development database when you run "rake". 23# Do not set this db to the same as development or production. 24test: 25 adapter: mysql2 26 encoding: utf8 27 database: mooovi_test 28 pool: 5 29 username: root 30 password: 31 socket: /tmp/mysql.sock 32 33production: 34 adapter: mysql2 35 encoding: utf8 36 database: mooovi_production 37 pool: 5 38 username: root 39 password: 40 socket: /tmp/mysql.sock 41 42default: &default 43 username: root 44 password: root-pass 45
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2018/01/27 12:11