Open source RDBMS (relational database management system) when used in conjunction with the Ruby on Rails framework.

learn more… | top users | synonyms

1
vote
1answer
28 views

How can I update a data record's value with Ruby on Rails 4.0.1/PostgreSQL Hstore?

I'm encountering a strange issue that must be user error on my part but can't figure it out. I'm using Ruby 1.9.3-p194, Rails 4.01, PostgreSQL. I have a model, Customer, with a column called data ...
0
votes
1answer
97 views

Can't push Rails App on Heroku since OSX 10.9, gem install pg is not working

Since OSX 10.9, I'm not able any more to push my rails app zu heroku. Heroku gives the following error: Failed to install gems via Bundler. Push rejected, failed to compile Ruby app When I ...
1
vote
1answer
39 views

Group by two columns, to get uniq result

I want to group the results from one table by two column: created_at p_id, I need to group it by p_id because I need unique values, and I tried using distinct in order to do that but in my case didn't ...
0
votes
1answer
66 views

RoR Hartl Tutorial: Section 11.1 - error when running rspec “operator does not exist”

First time posting. Been working through Hartl's RoR tutorial, and I'm stuck on an rspec test that is failing. I went over the code, and copy and pasted directly from the site instead of typing and I ...
0
votes
3answers
73 views

how to set up postgres database for local rails project

I recently got a new machine and would now like to work on my projects from github. I'm curious as to how to properly set up the postgres database on my local machine. I have postgresql, pgadmin3 and ...
0
votes
1answer
56 views

set up postgres users, roles and databases for rails

This really has me stuck, I'm a bit of a noob trying to use postgres for rails 4 I have postgres installed: $ psql --version psql (PostgreSQL) 9.1.10 contains support for command-line editing $ ...
0
votes
1answer
43 views

Rails: rake db:create:all (could not connect to server) psql works fine

I've looked here and here but still can't solve my problem. I have my setup working perfectly on my normal linux but when I tried to recreate it on my mac postgres won't work with rails. After ...
2
votes
0answers
84 views

JSON data type in Rails4 form_for

how to achieve filling values from JSON PostgreSQL type into nested form in rails? I have a model like title :text description :text grid :json Inside properties I want to store a dimension and ...
0
votes
0answers
54 views

Ransack, Postgres - sort on column from associated table with distinct: true

I have an app that uses the Ransack gem and I'm converting it from Mysql to Postgres. In an instance where the sort column is from an associated table and the distinct option is set to true, Postgres ...
1
vote
1answer
28 views

How do I specify what to limit in an includes activerecord query?

I have Shop.includes(:opening_times) .where("opening_times.day =?", Time.now.wday) .where("opening_times.opens > ?", @now) .order("opening_times.opens") ...
1
vote
2answers
39 views

RVM install giving postgres error (rails)

I get a postgres error when I'm trying to install rvm for some odd reason. $ sudo apt-get install ruby-rvm Error: Reading package lists... Done Building dependency tree Reading state ...
1
vote
2answers
76 views

Postgres <=> Rails . How to auto-create a user from database.yml

I am using PG for my rails4 application. Every time I git clone to a new machine or clear my project, I have to keep creating the user for postgres before I get the app working again. This is a ...
3
votes
1answer
90 views

how to query json data in text field rails postgresql

I have a database table column(collection) with data type text I have inserted json data in collection This is my json data {"name":"test","age":"25","country":"xxx"} But now how do i query this ...
0
votes
0answers
62 views

Ruby on Rails: How do I use Chef to provide the database parameters?

One of my Ruby on Rails apps is Bargain Stock Funds (https://github.com/jhsu802701/bsf), and it relies on a Ruby gem called bsf_scrape (https://github.com/jhsu802701/bsf_scrape) to obtain and process ...
1
vote
0answers
356 views

Set default value for Postgres JSON column in Rails < 4

So I'm starting to use the Postgres JSON datatype, now that there's a lot of fun stuff you can do with it. In one of my Rails apps which is not yet Rails 4 (where support for Postgres JSON has been ...

15 30 50 per page