Friday 15 March 2013

Rails not finding PostgreSQL database -



Rails not finding PostgreSQL database -

i trying switch first rails app sqlite postgresql. using nitrous box development , when tried switch postgre , deploy heroku didn't work i'm trying utilize postgre on nitrous. using rails 4.1.6.

first followed these steps:

https://devcenter.heroku.com/articles/getting-started-with-rails4#use-postgres

but getting error saying "psql: not connect server: no such file or directory" installed psql next steps no. 4 , 5 this:

https://gist.github.com/afshinator/8035821

in particular ran "parts install postgresql" , "parts start postgresql" on nitrous box. postgres version 9.2.4.

and added line database.yml file of "host: localhost" looks like:

default: &default adapter: postgresql host: localhost pool: 5 timeout: 5000 development: <<: *default database: db/db_development ...

and gemfile includes:

gem 'pg'

my table called "movies" , if type "psql db/db_development" , "select * movies;" can see table. can't access rails console active record.

ruby-on-rails postgresql heroku nitrousio

No comments:

Post a Comment