search for: all_hashes

Displaying 5 results from an estimated 5 matches for "all_hashes".

2007 Nov 08
0
mysql-ruby gem using significantly more memory that mysql.rb ?
...aware of this? My test loads a nasty grid of values using many include statements which result in about 5000 rows being returned (the actual number of rows is much less but the joins increase the number). When using ruby-mysql: The memory usage jumps from ~75megs to 161megs after executing result.all_hashes and does not go back down. When using mysql.rb: The memory usage jumps from ~75megs to 121megs after executing result.all_hashes and does not go back down. I have two major concerns.... 1.) why doesn''t the process eventually release the memory that is used up? I am destroying all refere...
2008 Feb 25
4
Using group in with find in an ActiveRecord appropriately
I''m playing around with the Practical Rails Projects code, and was attempting to make a change for graphing data differently using groupings. Basically the code went from: total_weight = @exercise.activities.collect {|e| e.repetitions * e.resistance} workout_dates = @exercise.activities.collect {|e| e.workout.date.to_s} To: total_weight =
2009 Apr 11
6
Inserting data from 1 table to another by using find_by_sql
...ect artist_name, album_name from temp_royalty_reports where id=328417") it saves the data into royalty_reports table but it gives following error and application crashes. i am using rails 1.2.5 You have a nil object when you didn''t expect it! The error occurred while evaluating nil.all_hashes vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:482:in `select'' vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'' vendor/rails/activerecord/lib/active_record/conne...
2010 Jul 19
0
Forking and integration tests
...ess and its children, I get into a total mess (due to concurrent access to the db connection). Sample errors from different runs: The famous "MySQL has gone away" Some other times it work perfectly! "Mysql::Error: SAVEPOINT active_record_1 does not exist" "undefined method all_hashes for nil:NilClass" I know that I have so many issues to handle here: concurrency safety, blocking DB adapter, the nature of the testing environment..etc But, is there another approach to handle it? What is the best practice of testing code for concurrency? I know that u may need more detail...
2008 May 15
6
mysql errors in production after upgrading to rails 2
I''m trying to upgrade our production server to rails 2. I''ve already done this on my dev machine (osx) and it worked fine. But now, with everything at the same version, but running in production mode, the production machine - a CentOS5 box - is getting loads of: ActiveRecord::StatementInvalid (Mysql::Error: Lost connection to MySQL server during query errors. i"ve looked