0
votes
0answers
26 views

Brackets display instead of space / out of a-z, 0-9, A-Z characters

I have a issue of display square brackets instead of some spaces OR another characters which is out of a-z, A-Z and 0-9. Using rails 3 with MySQL. Example: jalapeƱo above string display but ...
0
votes
1answer
31 views

Chicken and egg email

Here's the setup: I have a system with many Accounts, each with many Users. System superusers can broadcast a Message to all accounts. A Messaging represents the joining between an account and a ...
0
votes
0answers
57 views
+50

Active Record sql query not getting logged

I am facing a weird problem for sometime, wherein the active record queries are not getting logged in the terminal, or from rails console (using ActiveRecord::Base.logger = Logger.new(STDOUT)). The ...
0
votes
0answers
9 views

Resque Mysql2::Error: User has exceeded the 'max_user_connections' resource (current value: 10)

I am running Resque on Heroku, and my database is ClearDB. I am getting this error: "Mysql2::Error: User 'bdb2aedbee2c38' has exceeded the 'max_user_connections' resource (current value: 10): SHOW ...
0
votes
0answers
14 views

null values getting stored for has_one associations

Newbie here.. i've got a "employee has_one person","person belongs_to employee" association going on... when i post the data to create a new employee along with person details the details for the ...
0
votes
1answer
27 views

Working with existing database of a rails project

I want to run a ruby on rails project in my Ubuntu 12 mechine.After running the command bundle install i used the following command rake db:drop db:setup it shows -- ...
2
votes
1answer
63 views

Mysql 5.6 headaches on Mac OSX

Several of my colleagues and I have recently upgraded from MySQL 5.5 to MySQL 5.6 using homebrew on our Macs to test locally before upgrading our servers. Since this upgrade, we all have been ...
2
votes
3answers
22 views

How can I select the record with the latest date in each group

I have a table which we'll call table: table(id: integer, pid: integer, end: datetime) that has the following data: table: id pid end 1 1 1 2 1 2 3 1 3 4 2 11 5 ...
2
votes
1answer
39 views

Where should you store a lot of custom Strings in RoR?

I have a portal model. Every user gets their own portal. Now the user can customize various strings across multiple pages on that portal to show their customers. Overall there are around 50 strings ...
0
votes
0answers
34 views

Mysql index with multiple columns

I am using Rails 3.0.20. My DocVisit model looks like default_scope where(:active => true) belongs_to :customer belongs_to :department belongs_to :order belongs_to :patient I have following ...
4
votes
4answers
629 views

where is my database located when using mysql in rails?

I am learning to use mysql for rails apps, and I finally have been able to get my app up and running (sort of, for now). I managed to install mysql with homebrew, and then populated my database.yml ...
4
votes
1answer
34 views

How to write nested query in ruby on rails?

i want write a query for the following using where method SELECT * FROM videos WHERE 'privacy' = 'public' OR (privacy = 'private' AND id IN (SELECT vid FROM vid_ads ...
0
votes
1answer
15 views

Migrate old php site database to rails with legacy script and mantain old ids

I'm trying to migrate my old php website database (mysql) to a rails 3 app (mysql) by a rake legacy script like this: How to migrate legacy PHP mysql data to new Rails data model? but i have a ...
3
votes
3answers
322 views

Query intersection with activerecord

I'd really like to do the following query with the help with active record (select * from people p join cities c join services s where p.city_id = c.id and p.id = s.person_id and s.type = 1) ...
0
votes
0answers
30 views

How to easily switch database type (MySQL and MongoDB) in rails without duplicate models code?

For a project, i need to be able to deploy it with either MySQL or MongoDB (I'm currently using mongoid for that). My question is, is it possible to make "standard" models (especially about the ...

1 2 3 4 5 48
15 30 50 per page