Exception: ActiveRecord::PendingMigrationError
- Inherits:
-
MigrationError
- Object
- StandardError
- ActiveRecordError
- MigrationError
- ActiveRecord::PendingMigrationError
- Includes:
- ActiveSupport::ActionableError
- Defined in:
- activerecord/lib/active_record/migration.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ PendingMigrationError
constructor
A new instance of PendingMigrationError.
Methods included from ActiveSupport::ActionableError
Methods included from ActiveSupport::Concern
#append_features, #class_methods, extended, #included
Constructor Details
#initialize(message = nil) ⇒ PendingMigrationError
Returns a new instance of PendingMigrationError.
139 140 141 142 143 144 145 146 147 |
# File 'activerecord/lib/active_record/migration.rb', line 139 def initialize( = nil) if ! && defined?(Rails.env) super("Migrations are pending. To resolve this issue, run:\n\n bin/rails db:migrate RAILS_ENV=#{::Rails.env}") elsif ! super("Migrations are pending. To resolve this issue, run:\n\n bin/rails db:migrate") else super end end |