I started the postgresql server by doing this:
sudo service postgresql start
then I connected to the service:
sudo sudo -u postgres psql
then I created a database (i'm trying to add a voting system to my app):
postgres=# CREATE DATABASE "votes";
but i still have the same problem.
Also, when I do
rake db:create
I get a role "ubuntu" does not exist error
Here is my database.yml:
# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
#
# default: &default
#   adapter: sqlite3
#   pool: 5
#   timeout: 5000
# development:
#   <<: *default
#   database: db/development.sqlite3
# # Warning: The database defined as "test" will be erased and
# # re-generated from your development database when you run "rake".
# # Do not set this db to the same as development or production.
# test:
#   <<: *default
#   database: db/test.sqlite3
# production:
#   <<: *default
#   database: db/production.sqlite3
# FOR HEROKU -- POSTGRES DB SETUP
# UNCOMMENT WHEN WORKING LOCALLY.
development:
  adapter: postgresql
  database: votes
  pool: 5
  timeout: 5000
  username: ubuntu
test:
  adapter: postgresql
  database: planit_test
  pool: 5
  timeout: 5000
# production:
#   <<: *default
#   database: db/production.sqlite3
I'm trying to create an ubuntu rold:
$ sudo sudo -u postgres psql
psql (9.3.10)
Type "help" for help.
postgres=# CREATE ROLE ubuntu SUPERUSER
postgres-# \q
$ rake db:migrate
rake aborted!
ActiveRecord::NoDatabaseError: FATAL:  role "ubuntu" does not exist
 
     
     
    