Tagged Questions
0
votes
0answers
41 views
Rails how to implement hierarchical associations
Is there a Rails way to implement hierarchical associations?
I'm currently trying to map below layout fields in database:
Product -> Product URL -> No Link
-> ...
2
votes
0answers
946 views
Rails - Postgres - could not connect to server: Connection refused (PG::ConnectionBad)
Yesterday I've install Postgres and pgAdminIII, all worked correctly, but after reload it stopped working. After rails server I've got error message:
=> Booting Thin
=> Rails 3.2.13 application ...
0
votes
0answers
40 views
“Internal error” thrown by Rails to SQL conversion for query
Rails is throwing in "INTERNAL ERROR" when I try to run a particular query, does anyone have an idea how to resolve this?
XYZ and ALongString are obfuscations since this is related to my work.
...
0
votes
1answer
13 views
DB query from a belongs_to relationship
I have a model: Animal
belongs_to :owner
I have a model: Owner
has_many :animals
Owner has a boolean attribute active
def self.not_active
where('owner.active == ?', false)
end
The above ...
1
vote
0answers
41 views
Active Record: Add metadata to attributes
I got the following problem: I have a rails4 application with a postgresql. The database contains data that is imported from different sources. These sources have different priorities (or ...
0
votes
0answers
46 views
Data updated in development but not in production (Heroku PostgreSQL)
I am working on a Ruby on Rails app which is using a SQLite db for development and a Heroku Postgres db for production. I need to update the contents of a table in these databases but what I have ...
1
vote
1answer
62 views
Postgres: average user response time from interaction with a bot
I have a table that stores all messages between users and a bot (basically a state machine), and I'm trying to find all pairs of message/response from this table, in order to calculate each user's ...
0
votes
0answers
274 views
Using Sqlite3 test database and Postgres dev/production database in Rails
I currently have a rails project which I deploy to a production server which uses a postgres database. I develop my rails project in Windows, which means that if I want to test locally, I have to ...
0
votes
1answer
121 views
Rails Heroku database missing data
I'm new to Rails and Heroku.
I don't partly understand system of databases (testing, production, development).
I created two Rails apps. First with Rails' default sqlite db and second with ...
1
vote
0answers
201 views
heroku pg:transfer - receiving error during upload of postgresql db
I am trying to upload my local database to production and I keep running into the following error while processing:
$ heroku pg:transfer --from postgres://username:password@localhost/blog_develo
...
1
vote
1answer
119 views
RoR: 'rake db:seed' takes two hours
I have a problem. The command 'rake db:seed' takes two hours because myfriends.txt has over 3 Miliionen entries:
File.open("lib/friends_name/myfriends.txt", "r").each_line do |row|
row = ...
2
votes
1answer
351 views
Rails 3: Would PostgreSQL be a better fit than MySQL for partitioning tables?
Is Postgres a better option than MySQL for partitioning tables by date?
How well does Postgres play with Rails and when it comes to partitioning tables?
The purpose of my application will be to ...