Tagged Questions
2
votes
1answer
42 views
Rails - Give & Check size for user of schema
I have multi-tenant application with postgresql https://github.com/fauzieuy/sekolah.
How to give user size of schema?
Is it possible to check the actual size of the tenant through the Rails ...
4
votes
0answers
88 views
Large array in database won't load in rails view
I am trying to pull in data from an array into a view to form a chart. The array is stored in a database field and is very large. The array contains around 70k+ smaller arrays that look like this, ...
2
votes
0answers
25 views
Cancel Rails DB connection
I am writing an app that uses Server Side events with ActionController::Live. It is using the puma app server. A method in the Messages controller stays alive while the user is connected waiting for ...
1
vote
0answers
34 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 ...
0
votes
0answers
4 views
Rails find_by_sql with postgre function not working
I have a postgresql query that sum values by month, extracting the month value from a date.
SELECT vendors.name AS vendor,
SUM(purchases.invoice_total) AS invoice_total,
EXTRACT(MONTH FROM ...
0
votes
0answers
34 views
What are these two strange queries that keep running on every request?
I added miniprofiler to my app and I noticed the following two queries that run on every request regardless of the controller or view:
**GET http://acme.app.dev:80
T+4.3 ms
Reader
0.7 ms
...
0
votes
0answers
16 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 ...
0
votes
0answers
7 views
rake db:setup not work with Postgres and Postgis ERROR: could not access file “$libdir/postgis-1.5”: No such file
In Ubuntu, i try to run rake db:setup to install a Rails application, but i have several times this message ERROR: could not access file “$libdir/postgis-1.5”: No such file
Finding in the files, i ...
0
votes
0answers
12 views
Rails postgis adapter makes lot of queries in table “geometry_columns”
I'd like to optimize my Rails 3.2.13 application that's currently using postgis through activerecord-postgis-adapter gem.
The problem is that when I make a query in a table, even if there are only ...
0
votes
0answers
11 views
How to search tags by act_as_taggable_on with pg_search in Rails + Postgresql?
I'm trying to set up a search form that allows users to search for objects based on their name or any associated tags that were created with the acts_as_taggable_on gem. I think I found a piece of the ...
0
votes
0answers
38 views
Bulk data load to Heroku Postgres from flat files
UPDATE AT THE BOTTOM
I have large amounts of data to load to an Heroku Rails app.
Flat files are supplied by the user, and the plan is to upload them to S3, copy to Heroku ephemeral storage, and ...
0
votes
0answers
19 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
34 views
Can Octopus keep a pool of database connections?
We switched to using Octopus for sharding in our rails2.3/postgresql/resque app because we were maxing out the disk I/O of our database server. We have ten databases, each with multiple shards. (A ...
0
votes
0answers
29 views
Rails + Postgresql to_json order isue
Hi Im exporting json to a file with rails, however I can't get the order to be right.
I user this code but it produces json with the opposite order.
class TojsonWorker < ApplicationController
...
-1
votes
0answers
29 views
Rails Movies Database API
I am currently creating a Rails Movie app, there is a Movies controller with obviously models and views etc..
So that my app can be the app i need it to be, I will need my database to have a ...