mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Refer to Rails.env only when Rails is defined
This commit is contained in:
parent
5b1221347d
commit
524d4a35d2
1 changed files with 5 additions and 1 deletions
|
@ -32,7 +32,11 @@ module ActiveRecord
|
|||
|
||||
class PendingMigrationError < ActiveRecordError#:nodoc:
|
||||
def initialize
|
||||
super("Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=#{::Rails.env}' to resolve this issue.")
|
||||
if defined?(Rails)
|
||||
super("Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=#{::Rails.env}' to resolve this issue.")
|
||||
else
|
||||
super("Migrations are pending; run 'bin/rake db:migrate' to resolve this issue.")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue