Newb question: undefined local variable or method 'app_name'

I am trying to run unit tests on a brand new RubyMine Rails project on Windows 7.I am brand new to RubyMine and mostly new to Ruby.  All tests fail with the following. I figured it was some kind of fundamental tool/project configuration problem but I am stumped.

Fail to load: C:/Users/weilx002/RubymineProjects/NDAC/test/models/ndac_test.rb:1
      Exception message: undefined local variable or method `app_name' for main:Object
["(erb):32:in `<main>'", "D:/Ruby193/lib/ruby/1.9.1/erb.rb:838:in `eval'", "D:/Ruby193/lib/ruby/1.9.1/erb.rb:838:in `result'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/configuration.rb:106:in `database_configuration'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.0.2/lib/active_record/railtie.rb:175:in `block (2 levels) in <class:Railtie>'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `each'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.0.2/lib/active_record/base.rb:322:in `<module:ActiveRecord>'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.0.2/lib/active_record/base.rb:22:in `<top (required)>'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.0.2/lib/active_record/schema_migration.rb:3:in `<top (required)>'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.0.2/lib/active_record/migration.rb:783:in `schema_migrations_table_name'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.0.2/lib/active_record/migration.rb:791:in `current_version'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.0.2/lib/active_record/migration.rb:800:in `needs_migration?'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-4.0.2/lib/active_record/migration.rb:379:in `check_pending!'", "C:/Users/weilx002/RubymineProjects/NDAC/test/test_helper.rb:6:in `<class:TestCase>'", "C:/Users/weilx002/RubymineProjects/NDAC/test/test_helper.rb:5:in `<top (required)>'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'", "C:/Users/weilx002/RubymineProjects/NDAC/test/models/ndac_test.rb:1:in `<top (required)>'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'", "D:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'", "C:/Program Files (x86)/JetBrains/RubyMine 6.0.1/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:51:in `block in require_all_test_scripts'", "C:/Program Files (x86)/JetBrains/RubyMine 6.0.1/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:44:in `each'", "C:/Program Files (x86)/JetBrains/RubyMine 6.0.1/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:44:in `require_all_test_scripts'", "C:/Program Files (x86)/JetBrains/RubyMine 6.0.1/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:138:in `<top (required)>'", "-e:1:in `load'", "-e:1:in `<main>'"]

Please sign in to leave a comment.