Tagged Questions
5
votes
2answers
152 views
Rails migration is always inserting whitespaces or changing the ordering of columns in the schema
There is a frustrating issue where my rails migrations update the schema with whitespaces and the position of the table's columns.
So most times when I run bundle exec rake db:migrate it will do one ...
4
votes
2answers
3k 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) ...
3
votes
1answer
2k views
Can't store array in json field in postgresql (rails) can't cast Array to json
This is the error I'm getting when I run db:migrate
rake aborted!
can't cast Array to json
This is my table
class CreateTrips < ActiveRecord::Migration
def change
...
3
votes
1answer
91 views
How can I include big support databases in my RSpec tests?
I have 3 large read-only databases that support my Rails 3.2 application in that values in them are examined and some of them stored along with ancillary information in my main database. I have these ...
2
votes
0answers
116 views
Rails background worker seems to be wrapped in a transaction
I know how useless and vague the title is. Sorry. I don't have much other than some observation and evidence that nothing changed in my code.
I have a Rails 3.2.14 app using DelayedJob and PostgreSQL ...
1
vote
1answer
204 views
Why is Brew installed postgres looking here?
Why is brew installed postgres looking for /tmp/.s.PGSQL.5432 when I specified /var/pgsql_socket (unix_socket_directory = '/var/pgsql_socket') in my postgresql.conf?
Install was successful. I can ...
0
votes
1answer
40 views
Postgre SQL incorrect syntaxt near If [closed]
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" ...
0
votes
0answers
29 views
Rails 4 - Desire To Set PostgreSQL Password & Access Database in Rails
I added the following question in April 2014 hoping to set up a password for PostgreSQL but never found a workable solution. I am using a Mac Mini Server running the latest version of Mavericks with ...
0
votes
1answer
64 views
Adding Default Value to Column Depending on the Value of Another Field in A Model In A Rails 3.2.13 Database Migration
I already have a date field (string) in my model. I plan to add other string fields with different long date formats to use in a text search related to the existing date field. This is to facilitate ...
0
votes
1answer
665 views
Retrieve the nextval from a sequence using activerecord in Ruby on Rails 3.2.14 / Ruby 2.0.0 / PostgreSQL 9.2.4
This should be SO simple. I want to retrieve the nextval of a sequence... it's not a default value... it's not a primary key... it's not a foreign key. In rare cases, I need a sequence number for a ...
0
votes
2answers
190 views
How Can I Speed Up The Sending Of Emails Using ActionMailer from my Mac Mini Server?
I am currently using a Mac Mini Server running OS X Server. The server hosts several Ruby on Rails applications using Phusion Passenger where two of them uses a PostgreSQL database. One of these ...