Tagged Questions
0
votes
3answers
148 views
how to set up postgres database for local rails project
I recently got a new machine and would now like to work on my projects from github. I'm curious as to how to properly set up the postgres database on my local machine. I have postgresql, pgadmin3 and ...
0
votes
1answer
105 views
set up postgres users, roles and databases for rails
This really has me stuck, I'm a bit of a noob trying to use postgres for rails 4
I have postgres installed:
$ psql --version
psql (PostgreSQL) 9.1.10
contains support for command-line editing
$ ...
0
votes
1answer
36 views
Postgre SQL incorrect syntaxt near If
I'm trying to create function but it's having error at If statement don't know what's the problem with it.
CREATE FUNCTION uspgetcountrylistwithpagenumber(IN "PageNumber" integer, IN "PageSize" ...
1
vote
1answer
1k views
Connection refused (PGError) (postgresql and rails)
I keep getting this error when i try to run my localhost using "$rails s":
(Mac OSX 10.8.3)
(ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0])
(Rails 3.2.11)
(psql (PostgreSQL) ...
2
votes
1answer
6k views
Resetting password of PostgreSQL on ubuntu [closed]
i am using Ubuntu.some days before i installed Postgresql database for ruby on rails.i created a superuser for database server and i forgot the password of postgresql superuser.can any one please help ...
2
votes
2answers
192 views
How to manage the wals dir on a PostgreSQL replication server?
I have two PostgreSQL 9 servers running on Amazon EC2. One is the master, the other is a replication server in standby.
The replication server is continuing to fail as the hard drive fills up. It ...
1
vote
2answers
213 views
Get “latest” row after GROUP BY over multiple tables
I'd preferably like to first query listed below and just group by stories.id, but I get the following error:
ERROR: column "u.first_name" must appear in the GROUP BY clause or be used in an ...
0
votes
1answer
312 views
Trying to get postres and postgis running in rails app
I am completely new to Postgresql, Postgis, and SQL and have a little bit of rails knowledge. I am trying to get an existing app going on my local and am currently receiving the following messages ...
1
vote
1answer
598 views
Why is Rails dropping the Postgres connection on large bulk inserts?
I'm brand-spanking new to the world of linux and server administration, and I'm stuck.
I have a rails app that occasionally needs to perform large data inserts, usually around 20,000 rows. The code ...
8
votes
1answer
2k views
Error when creating unaccent extension on PostgreSQL
I am trying to configure PostgreSQL to use fulltext search in my rails app as mentioned in this Railscast.
I am using a fresh Ubuntu 12.04 server running PostgreSQL 9.1.5 installed using apt-get with ...
4
votes
1answer
4k views
Postgresql date() with timezone
I'm having an issue selecting dates properly from Postgres - they are being stored in UTC, but
not converting with the Date() function properly.
Converting the timestamp to a date gives me the wrong ...
1
vote
1answer
127 views
Rails Model associations but different databases
I am building an app which uses a mysql and a postgres database. I'm using postgres because of postgis as this app is location based. Postgres only has one database Places whereas mysql contains all ...
1
vote
1answer
245 views
ActiveRecord with Postgres: Has Many Through and Indexing
Let's say you have three models:
class Collection < ActiveRecord::Base
has_many :comments, through => :users
end
class User < ActiveRecord::Base
belongs_to :collection
has_many ...
6
votes
2answers
11k views
Rails: rake db:create:all fails to connect to PostgreSQL database
I am trying to create a Rails app that uses PostgreSQL. Here is a description of what I did.
PostgreSQL setup:
I installed PostgreSQL 9.1.3 via the ppa:pitti/postgresql maintained by Martin Pitt. ...