Request on a quick and easy way to link Postgresql with Rails app.
For further actions, you may consider blocking this person and/or reporting abuse
Request on a quick and easy way to link Postgresql with Rails app.
For further actions, you may consider blocking this person and/or reporting abuse
Piusha -
QAlogy -
QAlogy -
QAlogy -
Top comments (4)
What operating system do you have? DigitalOcean published at least a guide for Ubuntu Linux and one for MacOS, they are well written:
How To Use PostgreSQL with Your Ruby on Rails Application on Ubuntu 14.04
How To Use PostgreSQL with Your Ruby on Rails Application on macOS
Thank you so much rhymes!
databases link by convention to a given Rails app via the database.yml file in /config. When starting a new rails app, you set a flag on the rails new command: "rails new" options explained.
For different hosting environments [localhost, heroku, AWS, etc. etc.] it's easier to find their version of databases.yml and go with that.
see this line in the above link: --database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
So you would do:
rails new myprojectname --database=postgresql
Makes sense?
Thank you! yes makes total sense. I've been using the standard database that rails offers out of the box. Currently still learning my ways around rails and thought I could spice some things up.