Permalink
Browse files

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

…ils"
  • Loading branch information...
amatsuda committed Jul 28, 2013
1 parent 25324b6 commit 953b577f4378df06234d7e7ff409baa4d55890e8
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/migration.rb
@@ -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

@spastorino

This comment has been minimized.

Show comment Hide comment
@spastorino

spastorino Jul 28, 2013

Member

@amatsuda why was the warning happening?

Member

spastorino replied Jul 28, 2013

@amatsuda why was the warning happening?

@neerajdotname

This comment has been minimized.

Show comment Hide comment
@neerajdotname

neerajdotname Jul 29, 2013

Member

@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'
Member

neerajdotname replied Jul 29, 2013

@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.