0
votes
1answer
25 views

Rails: How update a Model without table

I have to update a table without Model. Say, name of the table is "users". If it has a Model I would update it like: obj = User.find_by_email "[email protected]" obj.name = "norman" obj.save But it ...
3
votes
2answers
42 views

Should I process a large amount of data with SQL or Ruby? [closed]

I have a MySQL table with hundreds of thousands of entries in it. I need to specify a date range and select all the entries between those two dates. I then need to break down the entries hour by hour ...
0
votes
1answer
24 views

Rails ActiveRecord find User where Products equals 0

I have a model User that has_many Product(s), but some Users don't have any products yet. I want to write a query that gives me all the Users who don't current have any Products i.e. a User where ...
0
votes
0answers
19 views

“Aborted_clients” on Rails 3.2, mysql2 gem, Amazon RDS (mysql)

Two weeks ago we migrated our database from a postgres instance hosted on the web server to a mysql instance hosted on Amazon RDS. After the migration, we started experiencing "Lost connection ...
0
votes
1answer
17 views

Using Sequelize along with ActiveRecord

I'm working on a project in which we have a main website developed using RoR and, in the other hand, we have a NodeJS server receiving/sending information. Both platforms use the same MySQL database, ...
0
votes
2answers
21 views

Can't connect to remote mysql server from rails

When I run: bundle exec rails c I get Mysql2::Error: Access denied for user 'root'@'$HOST' (using password: YES) despite the fact that this works just fine: mysql -h $HOST -P $PORT -u root -p ...
0
votes
0answers
46 views

Can't connect to MySQL server on '127.0.0.1' (61)

This is really hard to explain and I have no clue why I am getting a 'database' error. Can't connect to MySQL server on '127.0.0.1' (61) error when I click to my link here after I start the ...
0
votes
0answers
13 views

Getting undefined method `orders' for #<ActiveRecord::ConnectionAdapters::Mysql2IndexDefinition

Using activerecord-mysql2-adapter, I am getting undefined method `orders' for #<ActiveRecord::ConnectionAdapters::Mysql2IndexDefinition This is when I run rake db:schema:dump. I am trying to get ...
2
votes
2answers
37 views
+50

Rails + MySQL + Transactions + Locking, how do I prevent opening a transaction from unlocking the table?

In my Rails code I need to confirm that an action is allowed only if there is more than 1 of a certain record remaining. For this reason I need to lock updates and then perform a read. My rails code ...
0
votes
1answer
39 views

Ruby on rails get mysql information depending on option value

I am wondering how I should go about retrieving information from a mysql database associated with my ruby on rails app. When a user selects a product from the select box, I want to use the value of ...
0
votes
0answers
11 views

Is it possible to have a schema file when using multiple databases in a Rails application?

For various reasons, I have an app that must use two databases in production (corporate data coming from an AWS read-only (redundancy) database, and another normal/writable database for certain lead ...
0
votes
1answer
54 views

Mac OS X Lion - mysql: command not found

I have installed MySQL from this source, installation was successfully finished. But when I run in terminal which mysql, the output is empty. When mysql, the output is -bash: mysql: command not ...
0
votes
2answers
27 views

Trying to build rails 3.2 app over existing mysql db

I am trying to figure out how to build a rails app on top of an existing mysql db. I think the best method would just be to create a migration with the same layout as the existing db, but I am not ...
0
votes
0answers
30 views

Delete permission is granted for user to database but mongrel server shows Mysql::Error: DELETE command denied to user

Delete permission is granted for user to database but server shows Mysql::Error: DELETE command denied to user. I am using mongrel server for rails. When I login to mysql with same user credentials ...
1
vote
2answers
12 views

mysql2-0.3.11 can not be installed

Hi I want to install Gitlab on Debian 7.0 when i want to install the bundle i get follor error by mysql2-0.3.11 root@v22013051598612672:/home/git/gitlab# gem install mysql2 -v '0.3.11' ...

1 2 3 4 5 162
15 30 50 per page