0
votes
0answers
17 views
rails/postgresql: daily voting, results for time periods
Given there's a model named 'Topic' and a model named 'User'.
There's a static model 'Statement' that has a predefined set of records.
User is able to create Topics and set variable number of ...
1
vote
1answer
33 views
Make an IN statement using two attributes in Activerecord
I've been trying this for a while, and can't seem to get it right in Activerecord.
Given an array of asset_id and asset_type pairs, query a class that has both those attributes, only where both ...
0
votes
0answers
23 views
Text array column in Postgresql throwing type cast error after deploying to Heroku
I am developing a simple blog site app using Rails 4, and am running into a database issue on the production side. The Post model for my app has a :tags column, in which I have been using PostgreSQL's ...
0
votes
1answer
27 views
Getting Data out of a postgreSQL database with backbone.js
So can't get these albums rendered(in a rails index list fashion) with backbone that are persisted into my postgres db:
[#<Album id: 1, title: "abbey road", artist: "the beatles", created_at: ...
0
votes
2answers
44 views
Rails: rspec fails after switching to postgreSQL
I'm learning rails and following the Ruby on Rails Tutorial Book.
It had an extra challenge and taught me how to use postgreSQL instead of the default SQlite3.
However, since I have changed to ...
0
votes
4answers
35 views
Can't deploy to heroku [heroku log included]
I'm having trouble deploying to Heroku, I've installed postgresql but I don't think I've configured it properly. This may or may not be the problem, but I have a hunch it has something to do with it. ...
1
vote
2answers
17 views
PG::Error: ERROR: new encoding (UTF8) is incompatible
I have installed postgresql-9.2.4 from the source, now in rails app when I execute:
rake db:create command I get:
$ bin/rake db:create RAILS_ENV="test"
PG::Error: ERROR: new encoding (UTF8) is ...
0
votes
2answers
28 views
Use pg textsearch with multiple conditions
Im currently using postgres textsearch functionality to search recipes which have a particular ingredient like so
Recipe.includes("ingredients").where("ingredients.name @@ :query", :query => ...
0
votes
0answers
23 views
PostgresQL index row size [closed]
I am trying to store a rather large object using HSTORE with PG and index it with GEN:
class IndexMyTable < ActiveRecord::Migration
def up
execute "CREATE INDEX my_table_my_index ON ...
-4
votes
0answers
40 views
Database.yml problems [closed]
I'm having trouble with setting up a ruby on rails project. I forked a Ruby and rails repo, but I'm unable to use the "rails server" command. However, I set up a database.yml file, like the debugger ...
0
votes
0answers
9 views
trigram search returning <PgSearch::ScopeOptions::DisableEagerLoading:0x3fce0aef3130>
In my NewContact model, I have the following:
pg_search_scope :contact_from_search, :against => [:first_name, :last_name, :email],
:using => {
...
0
votes
0answers
25 views
PG::Error EOF detected on Heroku Cedar, rails 3.2.11
Having experienced a few periods of downtime, we've recently upgraded to a production environment in Heroku (Crane database plus 2 x web dynos) however we've seen no improvement. In fact reliability ...
4
votes
1answer
38 views
Rails 3.2 schema dump turns all UUID columns to text and mangles array declarations with postgres_ext gem
Using Ruby 2.0.0-p195 with Rails 3.2.13 and v0.3.1 of the postgres_ext gem.
It seems that I often have trouble with schema dumps (not SQL structure dumps) using Rails wherein the schema dumper ...
0
votes
0answers
26 views
Rails + PostgreSQL: How Do I save TimeStamp Values?
I'm building an API on Rails w/ Postgres, and users will be sending GET, POST & PUT requests of timestamps. I will not be handling timezones. It's up to the users to submit in UTC. So, what ...
0
votes
0answers
21 views
Datamapper:Heroku (Sinatra) DataObjects::SyntaxError - ERROR: relation “jobs” does not exist
I am writing a Sinatra DB based app with Datamapper and deploy to heroku.
This is the model:
class Job
include DataMapper::Resource
property :id, Serial, :key => true
property :user_id, ...