0
votes
2answers
19 views

Convert rails mysql SQL to work with postresql

I have the following tags method which selects tags based on how many times they are used and then arrange them in that order. Code is based on the railscasts episode: ...
0
votes
1answer
33 views

running rails on guest linux virtualbox: a database.yml issue

a) I'm a ruby in rails beginner developer, and I use windows 7 machine as developement environment... b) With VirtualBox I just installed, inside the Windows 7 "host", a Linux ubuntu sever "guest", ...
1
vote
1answer
45 views

Do rails Transactions blocks exit after all actions have been committed?

Related to Run rails code after an update to the database has commited, without after_commit, but I think deserving its own question. If I have code like this: my_instance = MyModel.find(1) ...
3
votes
2answers
56 views

Run rails code after an update to the database has commited, without after_commit

I'm trying to battle some race cases with my background task manager. Essentially, I have a Thing object (already exists) and assign it some properties, and then save it. After it is saved with the ...
0
votes
1answer
26 views

Paginating joined results with calculated columns

We are calculating statistics for our client. Statistics are calculated for each SpecialtyLevel, and each statistic can have a number of error flags (not to be confused with validation errors). Here ...
-1
votes
0answers
31 views

rake db:migrate error when switching from SQLITE3 to POSTGRESQL [duplicate]

I wanted to change my development environment from SQLITE3 to POSTGRESQL and when I am trying to run a migration I got the following error which I don't understand. I did rake db:create successfully. ...
1
vote
1answer
66 views

ActiveRecord::RecordNotFound (Couldn't find all Songs with IDs (7, 9, 10, 18, 44, 46, 47, 55) (found 4 results, but was looking for 8)):

So, I had a friend help me get Omniauth-twitter working. However, now I've got serious issue. In order to get Omniauth working we had to change the primary_key on the users table to :uid instead of ...
1
vote
1answer
32 views

How can I write a down or reversible function in this migration?

So, in-case this migration causes any errors I'd like to be able to revert back/rake db:rollback. The code: class ChangeUidToPrimaryKey < ActiveRecord::Migration def change execute ALTER TABLE ...
0
votes
1answer
61 views

How do I write a Rails ActiveRecord scope that combines rows and returns only latest date amongst three dates?

I have a Rails application with a table like this: id | parent_id | datetime_a | datetime_b | datetime_c 1 | 55 | 2013-08-03 11:00:00 | null | null 2 | 55 ...
1
vote
3answers
144 views

method in a model to match ALL association values

I have a model with a method where I am trying to "match all" tags a user selects. However, as soon as I select two tags in my app, and pass the params to the method below, it returns no results. One ...
0
votes
2answers
57 views

switching from Sqlite3 to PostgreSQL on an existing rails application

When I tried to switching from sqlite3 to postgresql in my existing application I faced this problem with rake db:migrate, I did the following 1 - rake db:create 2- rake db:migrate I got this ...
0
votes
1answer
41 views

Postgresql error after installation

I already have a rails project then i installed Postgresql and pgadmin III , I need to use posgresql in development instead of sqlite and production to use heroku , I followed the answer number two in ...
0
votes
0answers
12 views

Postgres searching domains with prefixes and english dictionary

I am using Postgres search through the Ruby gem pg_search. One of the columns I'm searching against contains domain names, such as "amazon.com", using a simple dictionary and prefixes I get the ...
1
vote
1answer
68 views

Heroku PG Dump Export and PSQL Import -> Double Encoding of Extended ASCII Characters

I've inherited a Heroku Rails application, which I am attempting to migrate into my dev environment. Heroku is running PG 9.1.9, Local is running PG 9.2.4. Rails 3.2.11, pg gem '0.13.2', Local OS ...
0
votes
3answers
43 views

Name search gem for Rails

I need to be able to search for partial names in my database. Is there a good gem I can install in my Rails project to do this? For example, a name 'Smith' should come up if I search for 'mit'. Not ...

1 2 3 4 5 45
15 30 50 per page