Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid "uninitialized constant ActiveRecord::PendingMigrationError::Ra…

…ils"
  • Loading branch information...
commit 953b577f4378df06234d7e7ff409baa4d55890e8 1 parent 25324b6
Akira Matsuda amatsuda authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/migration.rb
2  activerecord/lib/active_record/migration.rb
View
@@ -32,7 +32,7 @@ def initialize(name)
class PendingMigrationError < ActiveRecordError#:nodoc:
def initialize
- super("Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=#{Rails.env}' to resolve this issue.")
+ super("Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=#{::Rails.env}' to resolve this issue.")
end
end

2 comments on commit 953b577

Santiago Pastorino
Owner

@amatsuda why was the warning happening?

Neeraj Singh
Collaborator

@amatsuda running tests in reverse order now I'm getting uninitialized constant Rails .

  1) Error:
CopyMigrationsTest#test_check_pending_with_stdlib_logger:
NameError: uninitialized constant Rails
    /Users/nsingh/dev/rails_edge/rails/activerecord/lib/active_record/migration.rb:35:in `initialize'
    /Users/nsingh/dev/rails_edge/rails/activerecord/lib/active_record/migration.rb:379:in `exception'
    /Users/nsingh/dev/rails_edge/rails/activerecord/lib/active_record/migration.rb:379:in `raise'
    /Users/nsingh/dev/rails_edge/rails/activerecord/lib/active_record/migration.rb:379:in `check_pending!'
    /Users/nsingh/dev/rails_edge/rails/activerecord/lib/active_record/migration.rb:366:in `call'
    /Users/nsingh/dev/rails_edge/rails/activerecord/test/cases/migration_test.rb:851:in `block (2 levels) in test_check_pending_with_stdlib_logger'
    /Users/nsingh/dev/rails_edge/rails/activesupport/lib/active_support/test_case.rb:80:in `assert_nothing_raised'
    /Users/nsingh/dev/rails_edge/rails/activerecord/test/cases/migration_test.rb:851:in `block in test_check_pending_with_stdlib_logger'
    /Users/nsingh/dev/rails_edge/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:105:in `block (2 levels) in quietly'
    /Users/nsingh/dev/rails_edge/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:48:in `silence_stream'
    /Users/nsingh/dev/rails_edge/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:104:in `block in quietly'
    /Users/nsingh/dev/rails_edge/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:48:in `silence_stream'
    /Users/nsingh/dev/rails_edge/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:103:in `quietly'
    /Users/nsingh/dev/rails_edge/rails/activerecord/test/cases/migration_test.rb:850:in `test_check_pending_with_stdlib_logger'
Please sign in to comment.
Something went wrong with that request. Please try again.