0
votes
0answers
24 views
(postgreSQL error) FATAL: role “demo” does not exist (PG::Error)
So I've just installed postgreSQL with HomeBrew and have initialized my new demo_app with the: rails new demo_app -d postgresql command.
Albeit, I am getting the following error when starting up the ...
1
vote
1answer
34 views
indexing multi-column index with Rails / Postgresql
I have a doubt about correct indexing. I use rails 3.2.13, using Posgresql behind. BTW, Probably more a relational databases/indexing question...
I have this table:
# Table name: exams
#
# id ...
0
votes
1answer
22 views
we're sorry, but something went wrong on heroku when a user tries signing up [closed]
I can't correctly pinpoint what exactly is causing the issue
This is a new website I just pushed to heroku, ran heroku rake db:migrate, and heroku restart
It works just fine locally but this happens ...
0
votes
1answer
15 views
An error occurred in an after hook NoMethodError: undefined method `each' for nil:NilClass (AngularJS)
I'm using Rails 3.2.13 with postgres, rspec 2.13, capybara 2.0.3 and database_cleaner 0.9.1. I'm also using AngularJS. I have a spec with js:true which tests the submission of a form (creating a ...
0
votes
1answer
53 views
Can't connect to the postgres server ls: /tmp/.s.PGSQL.5432: No such file or directory
*Update*I included an update at the bottom of this post with details from the logs explaining the problem that I haven't been able to fix.
Following along with this Railscast ...
0
votes
0answers
21 views
Particular column not saving in Production only? Heroku/RoR/PostgreSQL
i can't for the life of me figure out why one particular column in my User table is not being updated--but only in Production on Heroku (Ruby on Rails, PosgreSQL).
I have a user avatar_url string ...
0
votes
1answer
20 views
Postgresql error when using Rails' uniq method
I have an Item model that belongs to a Product model. Product has a properties column of hstore type. I want to return a set of unique items that belong to a product, and that do not include the ...
0
votes
1answer
22 views
ActiveRecord not properly quoting query
I have a Cucumber scenario that fails in the following way:
Scenario: I can create a blog post # features/blog/create_blog_post.feature:6
Given I am the super admin ...
0
votes
3answers
34 views
How to sum fields after group_by
I need to group some records by date, then sum one field for each of those days.
This is the code I'm trying to refactor:
<% @startdate.upto(@enddate) do |date| %>
<% visitors = ...
0
votes
0answers
15 views
Using Postgresql with Amazon Opsworks - Getting IP address in database.yml
I'm trying to get a basic rails app working with Postgres using Amazon Opsworks. Opsworks lacks built-in support for Postgres at the moment, but I'm using some cookbooks that I've found which seem to ...
1
vote
1answer
50 views
Filtering model with HABTM relationship
I have 2 models - Restaurant and Feature. They are connected via has_and_belongs_to_many relationship. The gist of it is that you have restaurants with many features like delivery, pizza, sandwiches, ...
1
vote
1answer
31 views
How to optimize querying for thousands of IDs
Here are three consecutive queries with their Benchmark performance:
ids = @Company.projects.submitted.uniq.collect(&:person_id)
1.370000 0.060000 1.430000 ( 3.763946)
@persons = ...
0
votes
1answer
48 views
Ruby 1.9.3-p392 and PostgreSQL
I created a new rails app with rails new app_name -d postgresql and I am failing to use any rails command (rails s, rails g controller ControllerName, etc etc). I am getting these errors:
...
0
votes
1answer
26 views
Heroku: Regular 15 minutes downtimes on a simple Rails app
I'm new to Rails and just deployed my first app to Heroku (on the free tier). I set up a free trial of New Relic and set availability monitoring to ping my /register/ URL every 1 minute. I'm running ...
0
votes
2answers
21 views
Delayed Jobs: can't run rake jobs:work
Database:PostgreSQL 9.2
Delayed_job (3.0.5)
Delayed_job_active_record (0.4.4)
When I try to run rake task, rake aborted with:
"invalid byte sequence in UTF-8 (argument error)"
I have no idea ...