1
vote
0answers
72 views

Rails looking for Nonexistent ID column in schema_migrations table during initial migrartion

Running migration on a fresh db results in the following error. >> rake db:drop; rake db:create:all; rake db:migrate ...
1
vote
0answers
40 views

how to set rails validates uniqueness on column hstore key?

I have a table channels, with an hstore column credentials. The credentials for each channel might be different, but I want them to be unique when populated. I have set some postgres indexes like ...
1
vote
0answers
46 views

Rails Postgresql Time Column

I've got 2 Time Without Time Zone columns in my table (start_time and end_time). When an event occurs, I need to see which of these columns has a start_time < Time.now < end_time. The problem ...
1
vote
0answers
69 views

Heroku + Rails 3.2 + PostgreSQL = NoMethodError: undefined method `result' for #<NoMethodError:..>

NoMethodError: undefined method `result' for #< NoMethodError: ...> Stack trace refers to this place: def current_income return @current_income if defined? @current_income if ...
1
vote
0answers
162 views

Calling PL/pgSQL Stored Procedures from Ruby on Rails

I am working on a project where I am the database designer/admin in a PostgreSQL environment. The leader has decided to use Rails for the application logic and recruited a Rails programmer. The Rails ...
1
vote
0answers
67 views

rails s error libpq.so.5: wrong ELF class: ELFCLASS64

I am getting the subject error. It seems the error has something to do with the postgres libraries not being 64 bit, but other than that I can't figure it out. Bundle install runs alright, but when I ...
0
votes
0answers
20 views

Rails app loads very slowly not only at start

My heroku rails app is loading extremely slowly. If i go to the home page which has got some erb in it and some information that is collected from database it take about minimum 28 seconds to load ...
0
votes
0answers
29 views

Alternative for Serial type in RedShift / PostgreSQL

I am actually trying to make Rails working with RedShift, and facing some issue with Rails default indexes. My work is based on the repo activerecord-redshift-adapter. By default, Rails use the ...
0
votes
0answers
32 views

RSpec Boolean Validation

Test: it { should ensure_inclusion_of(:on_ride_photo).in_array([true, false]) } Validation: validates :on_ride_photo, presence: true, inclusion: { in: [true, false] } Errors: 1) ...
0
votes
0answers
19 views

How to resolve “could not find compatible versions for gem ”rake“ , when using dm-pg-types and (sass-rails, coffee-rails) gems together”

I started migrating my Sinatra app to Rails app and in process of changing the GEM file of a new Rails installation. I am using dm-pg-types and seems like it requires older version of rails , which ...
0
votes
0answers
39 views

nesting another field in a json column with a rails form

I'm trying to use the Json type available in the Postgres 9.2 release as a means to store a variety of data in one field. I created a column called data of json type on the corrections table. The form ...
0
votes
0answers
46 views

Rails Mysql to Postgresql Float

I'm transferring my database from mysql to postgresql. I have a latitude and longitude column for one of my models: t.float :latitude t.float :longitude I'm using mysql2psql gem to load the ...
0
votes
0answers
23 views

Rails 4 Heroku Mysql to Postgres Dump Pending Migrations

I've converted my mysql db to postgres. I'm used the following to import it to the db: heroku pgbackups:restore database 'http://app.com' --app This creates all the tables and imports the data. ...
0
votes
0answers
35 views

Foreign key associations in Rails with Postgres array possible?

Given the following Tweet: # db/schema.rb create_table "tweets", force: true do |t| t.integer "project_id", null: false t.integer "author_id", null: false t.integer ...
0
votes
0answers
14 views

Postgres searching domains with prefixes and english dictionary

I am using Postgres search through the Ruby gem pg_search. One of the columns I'm searching against contains domain names, such as "amazon.com", using a simple dictionary and prefixes I get the ...

1 2 3 4 5 9
15 30 50 per page