Problems with postgreSQL in ruby


#1

So I am new to programming and to cloud9 and am having problems with the ruby on rail package and heroku. You see heroku does not accept sqlite 3 so I used this guide: https://devcenter.heroku.com/articles/sqlite3 to change my sqlite3 gems to postgreSQL.

This caused some problems with my cloud9 preview page but I somehow managed to solve it by activating and connecting to postgreSQL

Then I tried adding the bootstrap gem. I did this by doing the following steps:

  1. I added the code gem
    ’bootstrap-sass’, '3.3.1’
    gem ‘sass-rails’, '~> 4.0.3’
    to my gemfile.
  2. Then I installed the bundle with bundle install
  3. I changed the following folder name: app/assets/stylesheets/application.scss
  4. I added the following code to my application.scss file:
    @import “bootstrap-sprockets”;
    @import “bootstrap”;

After doing this I started up the web server went to the preview page and got this error message:
FATAL: database “my_database_development” does not exist Run $ bin/rake db:create db:migrate to create your database?

So I did what the error message suggested and ran $ bin/rake db:create db:migrate in my console. This changed nothing. I also tried using the Setting up PostgreSQL commando’s to create a database but then I just get this message:
psql: warning: extra command-line argument “database” ignored
psql: warning: extra command-line argument “my_database_development” ignored
psql: invalid connection option “postgres”

I tried starting up and connecting to the postgreSQL server to be on the save side. But nothing has changed.

This is probably a good place to show you what my database.yml file looks like:

development:
adapter: postgresql
database: my_database_development
pool: 5
timeout: 5000

test:
adapter: postgresql
database: my_database_test
pool: 5
timeout: 5000

production:
adapter: postgresql
database: my_database_production
pool: 5
timeout: 5000

I am really at a loss here. So I was hoping for some help.

**Edit:**Changed post because my error message changed.