0
votes
0answers
8 views

How do you set pool size in production using rails and rubber gem?

I am using rails 3.2 and postgres 9.1. I'm hosting on Amazon EC2 instance, and using capistrano and rubber to deploy. So my question is, since I don't set database options in database.yml for ...
1
vote
1answer
38 views

Is it possible to have an Array of hstore in PostgreSQL

I am a complete beginner in PostgreSQL. And I was really amazed by the hstore datatype provided by Postgres. Well, I am using the Rails 3 framework and developing a simple app that uses PostgreSQL. I ...
0
votes
0answers
59 views

Failed to connect to database - can't push PostgreSQL database to heroku

I created a very simple blog app with a couple of entries and all I'm trying to do is push it to heroku, but I get the following error: $ heroku db:push [[email protected]:appname/blog.git] Loaded Taps ...
0
votes
1answer
29 views

different DB type boolean in production and development environment

I have a migration including the following type: create_table :products do |t| t.boolean :overdue end in my development setup though (Postgresql 9.1, rails 3.2.11) I have to test p.overdue == ...
0
votes
1answer
73 views

postgis st_distance returning incorrect results

I am using postgis to calculate distance between 2 geo co-ordinates. select st_distance( 'POINT(15.651955 73.712769)'::geography, 'POINT(14.806993 74.131451)'::geography) AS d; It's returning ...
1
vote
1answer
134 views

SELECT FOR UPDATE doesn't block on Rails 3.2.11 with PostgreSQL 9.1

I am trying to use pessimistic lock to avoid race condition. I was expecting the after one thread acquired a row via SELECT FOR UPDATE, another thread looking for the same row will be blocked until ...
0
votes
1answer
58 views

How to store only the time in the database?

I'm using rails 3, I want to store start_time and end_time. Since rails does not support date ranges. which data type should I use to store the time without the date to later make comparisons? This ...
0
votes
2answers
44 views

How to get records based on an offset around a particular record?

I'm building a search UI which searches for comments. When a user clicks on a search result (comment), I want to show the surrounding comments. My model: Group (id, title) - A Group has many ...
0
votes
1answer
65 views

Is a DB index possible to optimize a pg_search, pg_search_scope method?

I'm working to add search to my PostgreSQL 9.1 rails app. Here is the setup: class Comment < ActiveRecord::Base include PgSearch pg_search_scope :search_by_content, :against => :content ...
0
votes
1answer
81 views

ActiveRecord::ConnectionNotEstablished within a rake task

I'm working to create a rake task to remove a few tables and triggers. My rake task: task :remove_rubyrep do sql = <<-SQL DROP TABLE rr_logged_events, rr_running_flags, ...
2
votes
1answer
49 views

What is “public.rr_pending_changes” and why is taking up 9gigs?

I'm running a rails 3 application with PostgreSQL 9.1 on AWS. The PostgreSQL setup has one master and a slave. We recently noticed our db backups were taking a long time and over 1gig compressed. ...
0
votes
2answers
310 views

Rails and Postgres - COPY from .cvs to table while skipping created_at column

My client has given me a list of vehicles for a project. I need to get them into a table I can use, but they're currently in a .cvs file. I've read around and found some info, but nothing that ...
0
votes
1answer
241 views

postgresql version won't change from default

mac os x lion 10.7.4 psql --version -> psql (PostgreSQL) 9.0.5 I want to install latest version and run my rails app with it. I do brew install postgresql it is installed here: ...
0
votes
2answers
205 views

ERROR Unkown database: DATABASE_URL after overriding the DATABASE_URL in the heroku app

I am trying to connect two Heroku apps to one database. So I overrided the DATABASE_URL. now the heroku config as: === muse-me Config Vars DATABASE_URL: ...
0
votes
1answer
53 views

Rails 3: PostgreSQL access denied after renaming app

I just renamed my application (replacing all instances of the old name with the new one), and now my application can no longer connect to the postgres database running on localhost. PG::Error (could ...

1 2
15 30 50 per page