Closed ghost closed 7 years ago
@jrenna100 Have you changed config/database.yml to support postgres? Here is an example:
development:
adapter: postgresql
encoding: unicode
database: [dev_dbname]
host: localhost
pool: 5
username: [dbusername]
password: [dbpassword]
test:
adapter: postgresql
encoding: unicode
database: [test_dbname]
host: localhost
pool: 5
username: [dbusername]
password: [dbpassword]
production:
adapter: postgresql
encoding: unicode
database: [prod_dbname]
host: [prod_host]
pool: 5
username: [dbusername]
password: [dbpassword]
Replace the above values with your actual credentials.
NOTE: And also move the pg gem into group :development if you wanna use it it development.
Hi. This may not be exact, but this worked for me using Cloud9. Im sure the steps are the same of a local setup.
Page Link: https://github.com/Aerogami/guides/wiki/Cloud9-workspace-setup-with-Rails-and-Postgresql
Good Luck.
On Wed, Apr 12, 2017 at 1:26 PM, Sudharsanan Muralidharan < notifications@github.com> wrote:
@jrenna100 https://github.com/jrenna100 Have you changed config/database.yml to support postgres? Here is an example:
development: adapter: postgresql encoding: unicode database: [dev_dbname] host: localhost pool: 5 username: [dbusername] password: [dbpassword]
test: adapter: postgresql encoding: unicode database: [test_dbname] host: localhost pool: 5 username: [dbusername] password: [dbpassword] production: adapter: postgresql encoding: unicode database: [prod_dbname] host: [prod_host] pool: 5 username: [dbusername] password: [dbpassword]
Replace the above values with your actual credentials.
NOTE: And also move the pg gem into group :development if you wanna use it it development.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/scaffeinate/socify/issues/41#issuecomment-293697154, or mute the thread https://github.com/notifications/unsubscribe-auth/AOKyyg3dBI7jN75q2Ja_XsRghwqbuYe8ks5rvTNfgaJpZM4M75a6 .
-- Best, Aris Nance Lavail.io
@ArisNance That looks good 👍 . It's similar but everything is stored in the ENV variables as it's meant to be. @jrenna100 You might wanna use a similar config with the ENV config set for production env. For Development you could just hardcode the the plain credentials as it won't make any difference.
thanks guys it worked! had psql set up wrong. found another bug tho i think gonna post new thread
@jrenna100 Cool. I am closing this issue :)
tried everything but cannot figure out plz post with empty postgresql database set and how to set it