title: Postgresql: FATAL: password authentication failed for user "rooms"
body: <p>I just installed rails and postgresql (by following <a href="https://gorails.com/setup/ubuntu/14.04" rel="nofollow">this</a> tutorial) on a new computer and I'm trying to run a rails app that had been previously made and is working and in production. However, once I tried running the app, I received this error: </p>
  
  <pre><code> /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize': FATAL:  password authentication failed for user "rooms" (PG::ConnectionBad)
  FATAL:  password authentication failed for user "rooms"
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
      from /home/andrew/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
      from /home/andrew/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/model_schema.rb:310:in `clear_cache!'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activerecord-3.2.19/lib/active_record/railtie.rb:103:in `block (2 levels) in &lt;class:Railtie&gt;'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:418:in `_run__3258742772582479979__prepare__847046652929319931__callbacks'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:405:in `__run_callback'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/callbacks.rb:81:in `run_callbacks'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/actionpack-3.2.19/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/actionpack-3.2.19/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/application/finisher.rb:47:in `block in &lt;module:Finisher&gt;'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `instance_exec'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `run'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:55:in `block in run_initializers'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `each'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `run_initializers'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/application.rb:136:in `initialize!'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `method_missing'
      from /home/andrew/Documents/mywebroom/config/environment.rb:5:in `&lt;top (required)&gt;'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `block in require'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
      from /home/andrew/Documents/mywebroom/config.ru:3:in `block in &lt;main&gt;'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
      from /home/andrew/Documents/mywebroom/config.ru:in `new'
      from /home/andrew/Documents/mywebroom/config.ru:in `&lt;main&gt;'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/commands/server.rb:46:in `app'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/commands/server.rb:70:in `start'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/commands.rb:55:in `block in &lt;top (required)&gt;'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/commands.rb:50:in `tap'
      from /home/andrew/.rvm/gems/ruby-2.1.2/gems/railties-3.2.19/lib/rails/commands.rb:50:in `&lt;top (required)&gt;'
      from script/rails:6:in `require'
      from script/rails:6:in `&lt;main&gt;'
  </code></pre>
  
  <p>Here's what my <code>database.yml</code> file looks like:</p>
  
  <pre><code>development:
      adapter: postgresql
      encoding: unicode
      host: localhost
      database: rooms_development
      pool: 5
      username: rooms
      password: rooms
  </code></pre>
  
  <p>I'm still new to rails and I have no idea how to fix this - please help!</p>