Tagged Questions
0
votes
2answers
44 views
Rails: rspec fails after switching to postgreSQL
I'm learning rails and following the Ruby on Rails Tutorial Book.
It had an extra challenge and taught me how to use postgreSQL instead of the default SQlite3.
However, since I have changed to ...
0
votes
4answers
35 views
Can't deploy to heroku [heroku log included]
I'm having trouble deploying to Heroku, I've installed postgresql but I don't think I've configured it properly. This may or may not be the problem, but I have a hunch it has something to do with it. ...
0
votes
1answer
13 views
Rails, CKEditor, PostgreSQL, image upload with Carrierwave
When I try to insert an image into my blog I select the Upload tag and select my file and Send it to Server. Then at the URL tab I select Browse Server and I get the following error:
...
2
votes
2answers
43 views
Calculate offset of a row
I am writing a server side on RoR, which uses postgresql.
Today I faced a feature, in what I need to identify the current offset of a row in the table. Client send me a unique identifier and I need ...
0
votes
2answers
133 views
Cannot run rake db:migrate, relation does not exist
I am trying to get a working app to work on linux 10.04 running on vagrant
I installed all relevant gems, installed postgresql 9.1.9 and when I am trying to run
rake db:migrate I am getting
rake ...
0
votes
1answer
18 views
Rails Article.find 1 raises ActiveRecord::StatementInvalid on legacy database
I'm creating a rails app over a legacy database table. Everything works fine locally, but on the server I hit this error whenever I do Article.find(1)
Could not log "sql.active_record" event. ...
0
votes
1answer
28 views
PostgreSQL management on Ubuntu [closed]
I'm looking for database management tool for PostgreSQL to host on Ruby. It would be nice to see and manage whole database and data on my Ubuntu VPS.
Is there any tools for this?
Maybe there is ...
0
votes
0answers
15 views
Rails Join Table Issues
In my app there is an Athlete and this athlete has many sports (joined through a user_sports table). Now, each sport has a position (Pitcher, Third Base, etc).
Where I am stuck at is trying to ...
0
votes
1answer
90 views
Complex Rails/Postgres SQL optimization
Restaurant
has_many Dish
Dish
has_many Photo
Photo
belongs_to Dish
Restaurant 1
Dish 1
Photo 1 May 9, 1:00 PM
Dish 2
Photo 2 May 9, 2:00 PM
Dish 3
Photo 3 May 9, 3:00 PM
...
0
votes
1answer
64 views
Rails on Heroku: ActiveRecord::StatementInvalid, resetting and migrating doesn't work
I'm getting the error below when trying to open the app that I just pushed to heroku, everything works fine locally. I've tried deleting and re-pushing, using rake db:reset, pg:reset, db:migrate and ...
-1
votes
1answer
55 views
Sort group of records based on different columns
I have a four columns in table called recordings such as score, event_id, user_id and I would like to sum the score of recordings based on user id + event id,
and then I would like to show the users ...
1
vote
1answer
65 views
rake db:create:all FATAL : password authentication failed
I am trying to follow this railscast tutorial. Now I am in the step, where you create the database with rake db:create:all, but I got this error message :
FATAL: password authentication failed for ...
3
votes
2answers
50 views
ActiveRecord query too difficult for my tiny brain
I have an activerecord model Event that I want to order by a rank. The rank will be a sum of weighted properties. For instance I might want to rank an event with some logic like:
LOG(number of ...
2
votes
1answer
69 views
Order with a has_many relationship
I have Articles that have_many Metrics. I wish to order the Articles by a specific Metric.value when Metric.name = "score". (Metric records various article stats as 'name' and 'value' pairs. An ...
0
votes
1answer
148 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 ...