title: Rails s error: `method_missing': undefined method `active_record'
body: <p>My rails project works before. I got this error because I deleted mysql and everything associated mysql.</p>
  
  <p>Then I reinstalled mysql. It got this error. Then I reinstalled ruby and rails. The error is still here. Using "rails new myapp", 
                 then "bundle instal", 
                 then "rails s", </p>
  
  <p>I got the following error:</p>
  
  <pre><code>=&gt; Booting WEBrick
  =&gt; Rails 4.0.2 application starting in development on 
  
  =&gt; Run `rails server -h` for more startup options
  =&gt; Ctrl-C to shutdown server
  Exiting
  **/home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `active_record' for #&lt;Rails::Application::Configuration:0x0000000303cae8&gt; (NoMethodError)
      from /home/cwu/Dropbox/project/web/atop/config/environments/development.rb:23:in `block in &lt;top (required)&gt;'**
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:24:in `class_eval'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:24:in `configure'
      from /home/cwu/Dropbox/project/web/atop/config/environments/development.rb:1:in `&lt;top (required)&gt;'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in &lt;class:Engine&gt;'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in &lt;class:Engine&gt;'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `call'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `call'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
      from /home/cwu/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
      from /home/cwu/Dropbox/project/web/atop/config/environment.rb:5:in `&lt;top (required)&gt;'
      from /home/cwu/Dropbox/project/web/atop/config.ru:3:in `require'
      from /home/cwu/Dropbox/project/web/atop/config.ru:3:in `block in &lt;main&gt;'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
      from /home/cwu/Dropbox/project/web/atop/config.ru:in `new'
      from /home/cwu/Dropbox/project/web/atop/config.ru:in `&lt;main&gt;'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:48:in `app'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands/server.rb:75:in `start'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in &lt;top (required)&gt;'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
      from /home/cwu/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `&lt;top (required)&gt;'
      from bin/rails:4:in `require'
      from bin/rails:4:in `&lt;main&gt;'
  </code></pre>