0
votes
1answer
14 views

column spree_preferences.key does not exist

When I run rake db:migrate I get the following error message. PG::Error: ERROR: column spree_preferences.key does not exist` Anyone can please tell me how to fix this error.
1
vote
1answer
41 views

Active Record sort by min value

I have a few models, City, Hotel, and Room. City has_many hotels, hotels has_many rooms. Each room has a price. I'm trying to sort by the lowest price room, asc and desc. In my results, I'm also ...
0
votes
1answer
44 views

Creating a general index when using nested routes

I am new to rails, and for the first time I am working with pgsql. The way my project is set up it requires that a song cannot be created with out an artist. To accomplish this I used nested routes so ...
0
votes
0answers
22 views

Rails code working with sqlite but fails on heroku with postgres

Can any one suggest why the following query might be raising error: TypeError: can't dump anonymous class Class: INSERT INTO "emails" ("content", "created_at", "email_from", "email_to", "filter_id", ...
0
votes
2answers
20 views

How to write update all based on row value for date type column?

I have datetime column data type in ReminderDetail model, and I want to update_all values belonging to that column. I have written below query ReminderDetail.update_all("reminder_date = ...
0
votes
2answers
53 views

Rails Postgres - Datetime value won't save into Datetime column

My model has a datetime attribute (Postgres) and I am attempting to create a new record via form submission in my Rails app. The form I'm submitting contains a text_field for that datetime attribute. ...
0
votes
0answers
23 views

Storing rails code in database. Upgraded from Rails 2 to Rails 3

I have the following piece of code illustrated as below. Was working in my Rails 2 application but having upgraded to Rails 3 it not longer works. When I render this code, I'm getting like, ...
0
votes
1answer
24 views

Ruby on Rails page load error “could not connect to server: Connection refused (0x0000274D/10061)”

When I run my "rails server" command, and go to my web page, I get this error http://s7.postimg.org/jcxqxl3gr/image.png I am using Postgresql and have only installed the twitter-bootstrap-rails gem. I ...
0
votes
2answers
30 views

Heroku PostGres database update structure without deleting data

If I make database changes locally, and then use postgres with heroku, what does pushing the database actually do? Update schema, data, or both? There is no information on what actually happens when ...
1
vote
1answer
28 views

Heroku Asks for PG gem when I have Mongoid

I'm receiving the following error Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.) (LoadError) whenever I ...
0
votes
0answers
44 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
2answers
34 views

Read data from other postgres database

I have a Rails app A with a postgres database. I also have another Rails app B with a postgres database. Now I want to reuse some of the data of app B in app A. What is the best way to import that ...
1
vote
1answer
32 views

Cannot get Postgres.app connection

I'm using Mountain Lion and want to switch my rails app from SQLIte to Postgres so I can deploy on Heroku. I have installed Postgres.app and it's working fine if I open it with the path suggested: ...
0
votes
1answer
32 views

Finding records based on no returned records from a related table

Dealing with two tables in Postgres: Members and Memberships. Memberships have an end_date column that can be NULL if the membership is still running. As soon as it has ended, or the end date is known ...
0
votes
0answers
40 views

update query not updating in postgresql

Not updating postgresql database when update_all using @change_stat = Notification.where("fb_id = ? AND active = ?",@current_user.fb_id,true) @change_stat.update_all(:active => false)

1 2 3 4 5 43
15 30 50 per page