Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I would like to advise to you that you should download Postgresql including the PGADMIN itself which is easier to use than the psql terminal.</p> <p>And I think when you download/install Postgresql from their official website... the package was complete already.</p> <p>Upon installing, the postgresql will ask you a certain password that you will be using in accessing your postgresql server.</p> <p>After the installation, open the PGADMIN and connect to the server. Enter your password (which you had declared during installation).</p> <p>If you can't connect to the server, then edit the port. To do this, right click the server then go to properties... edit the port into something which is free. Example: 5433 and so on. It's up to you.</p> <p>If everything's finally working... setup the correct config for your database.yml</p> <p>This is important:</p> <pre><code>development: adapter: postgresql database: name_of_database_here host: localhost username: postgres password: your_db_server_password_here pool: 5 timeout: 5000 port: 5433 </code></pre> <p>Okay from that config info above, specify the important parts. By default, your db server username is postgres and obviously your host is localhost because you are setting up under the development.</p> <p>If your port is 5432 by default then just remove the port part.</p> <p>Let's go to your gemfile.</p> <p>In order for you to deploy your app in heroku. Use gem 'pg' instead of sqlite3.</p> <p>If you have an existing sqlite3 database then put the gem inside the development group. In that case, Heroku will successfully bundle during git push heroku master process.</p> <pre><code>group :development do gem 'sqlite3' end </code></pre> <p>Your <code>gem 'pg'</code> can either go outside the groups or put it in your production group.</p> <p>Important:</p> <p>Before any deployment procedure, make sure that you can run the app locally (localhost). Then if everything's working... that's the time that you should organize the necessary stuffs appropriately.</p> <p>If you wish to switch to Postgresql instead of sqlite3 after pushing the app to Heroku... you can do so by pgbackups add-on and pg_restore the dump file into your local postgresql db server.</p> <p>That's it. Hope it helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload