開発環境では問題なくrails db:migrate が通るのですが、
herokuに「heroku run rails db:migrate」を実行すると以下のエラーがおきてしまいます。
DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1. Please use `config.public_file_server.enabled = true` instead. (called from block in <top (required)> at /app/config/environments/production.rb:25) == 20161219024215 CreateGames: migrating ====================================== -- create_table(:games) rails aborted! StandardError: An error has occurred, this and all later migrations canceled: PG::UndefinedTable: ERROR: relation "tournaments" does not exist
railsのバージョンは「Rails 5.0.0.1」です。
なにやらrails 5.1では「config.serve_static_files」が削除されるから代わりに「config.public_file_server.enabled = true」を使えとかかれているようなのですが、「production.rb」を以下のようにしてもエラーメッセージに変化がありません。
Rails.application.configure do config.public_file_server.enabled = true <--ここに追記しました! config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.public_file_server.enabled = true config.assets.js_compressor = :uglifier config.assets.compile = false config.assets.digest = true config.log_level = :debug config.i18n.fallbacks = true config.active_support.deprecation = :notify config.log_formatter = ::Logger::Formatter.new config.active_record.dump_schema_after_migration = false end
先に進めず困っています。
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/12/26 04:02
2016/12/26 05:46
2016/12/26 07:41
2016/12/26 07:59