Tagged Questions

0
votes
2answers
36 views

DateTime arithmetic in an ActiveRecord query (PostgreSQL)

I have two datetime columns in a User/users table: created_at and birthdate. I'd like to find users whose birthdate is less than 13 years before their creation date. The equivalent Rails if statement ...
0
votes
2answers
26 views

Heroku case sensitivity

I have recently uploaded my application to heroku and due to the postgresql, the case sensitivity does not work, I am wondering how will I fix this? My code is as followed: relation = ...
0
votes
0answers
14 views

How can I assign an order or weighting to a column using texticle search?

I'm using texticle to search through the name and description attributes of a product model. So far, texticle seems to rank the query found in the description higher than the query found in the ...
0
votes
1answer
29 views

SQL to Return Id Arguments of Records That Are Found not to Exist

I have a query where by I'm working with an array of properties e.g. [1,2,3,4] etc. I need to check a table to see if a record with that id exists, I'm interested in the ones that don't exist rather ...
1
vote
1answer
11 views

RoR Postgresql timezone group by not working on Heroku

I would like my reports to display in CST while my database is in UTC. For this to work I need to be able to group by a time column and have the db do timezone conversions. This works on my dev ...
0
votes
1answer
43 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. ...
0
votes
0answers
23 views

pg_dump not found in rails

I installed postgres, however when I try dump my database schema (sql) in a rails project I keep getting this error message in the console pg_dump not found in rails. Can anyone help with how to ...
0
votes
1answer
38 views

PostgreSQL full text search, space symbols, and lexemes

So basically my problem is that the PL/pgSQL parser treats symbols like '#' or '+' as space symbols (which is OK) hence the queries like 'C++' or 'C#' or 'PL/SQL' are parsed like so: asciiword | ...
0
votes
2answers
28 views

rake db:structure:dump fails under PostgreSQL / Rails 3.2

I get this error message: pg_dump: too many command-line arguments (first is "demo_db") Try "pg_dump --help" for more information. rake aborted! Error dumping database Tasks: TOP => ...
0
votes
1answer
26 views

heroku pg error using rails, saying type modifier is not allowed for “text”

i get the error PGError: ERROR: type modifier is not allowed for type "text" LINE 1: ...ng(255), "desc" character varying(255), "content" text(255),... when i do a heroku run rake db:reset i ...
1
vote
1answer
31 views

PostgreSQL - how to fetch rows higher then year since the date

I have in the DATE column saved a dates. I try to get those rows, that are higher since that date about a year, two years etc. The year, two years is a parameter from my app. Is possible to get these ...
0
votes
2answers
26 views

Is Not Null Scope Causing Errors in PSQL Rails App

I have a rails app running on heroku, for some reason the following scope is causing a lot of trouble and throws an error in PSQL ('rating' is an integer): scope :rated, where("posts.rating ...
0
votes
1answer
50 views

Rails 3.2 from SQLite locally to Postgres on Heroku

I've developing an app locally with sqlite but now want to move it to Heroku, so I will use postgres from now on. I don't need to keep the database as it is so far, I just need Heroku to not try to ...
1
vote
2answers
164 views

OSX Lion - can't install Postgres gem

I am not sure what happened - I know Postgres was working right after the upgrade to Lion, but it is not working anymore. I have Xcode 4 installed. error: $ gem install pg -- ...
0
votes
1answer
26 views

In Rails, will database locking ensure only process is checking a attribute value at one time without being a giant bottleneck?

Our setup is Rails 3 with a 6 app servers behind a load balancer and one PostgreSQL database. In our app, and user can "tip" and artist during a performance. The process flow looks like this: User ...

1 2 3 4 5 50
15 30 50 per page