...scope chain, it only mashes together strings that mostly happen to look like a MySQL query in the end. I don't generally advice against using scopes with JOINs. What...

...to you database and database table charsets to UTF8. You can check in the MySQL console with SHOW VARIABLES LIKE "character_set_database"; SHOW TABLE STATUS; Also update your nbsp...

...I measured the runtime of different strategies using an average-sized Rails project (with MySQL): Cucumber RSpec Transaction 87.14, 86.65 10.20, 10.11 Truncation 90.43, 90.69 26.82, 26.46

MariaDB (and MySQL) is released in different versions with different behaviors. For backwards compatibility this can be managed with the sql_mode option. Following you can find behavior differences which...

...sudo gem install rails -v=2.3.12. You will also need Ubuntu development packages for MySQL, RMagick, etc. The bundle install call will otherwise fail for such projects...

...foreign keys. They are dumped to schema.rb as well. At this time, only the mysql, mysql2 and postgresql adapters support foreign keys. @rubyonrails Workings add_foreign_key(:comments, :users)

In the tradition of our PostgreSQL cheat sheet for MySQL lamers, here is a cheat sheet for Jasmine when you're used to RSpec. Note that Jasmine syntax has changed...

...and need to be sanitized. Unfortunately this works in SQLite but does not in MySQL: named_scope :filter, lambda { |attribute, value| { :conditions => [ 'articles.? = ?', attribute, value ] } } The solution is to use...

This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name, department_area = areas.name FROM departments, areas WHERE employees.department_id = departments.id...

...pg_database ORDER by size_in_mb DESC; Want to see database sizes in MySQL...

agileweboperations.com

...technical tasks which cannot be directly linked to customer value. Things like “Upgrade to MySQL 6.0″ or “replace magic numbers with enums” need to be done. How can you prioritize...

highscalability.com

...supported; consistently good performers; failure free as possible; free. Using these criteria they selected: MySQL, Solr, Memcache, and Redis. Cassandra and Mongo were dropped...

...BigDecimal('12.3413') gross = net * VAT_RATE # gross is now a BigDecimal ActiveRecord models represent MySQL's DECIMAL columns as BigDecimal attributes. Keep in mind that values assigned to such attributes...

edgeguides.rubyonrails.org

...json and array take away a lot of the pain that you had on MySQL projects. Example use cases for array are tags or storing foreign keys (instead of a...

Open a MySQL root shell and use this command: PURGE BINARY LOGS BEFORE DATE(NOW() - INTERVAL 3 DAY) + INTERVAL 0 SECOND...

github.com

...to migrate to Minidusen, which extracts those parts from Dusen. Minidusen is compatible with MySQL, PostgreSQL and Rails 3.2, 4.2 and 5.0. If you are looking for a full text...

til.hashrocket.com

...second SELECT statement with a subselect. Note that sub-queries are extremely slow in MySQL, but they can make cases easier where performance does not matter so much (e.g. a...

...ruby-debug and use e.g. byebug Remove gem oniguruma Remove gem fastercsv Replace gem mysql with mysql2 Update gem capistrano 2.12.0 to ~>2.12 when bound for Ruby 1.8.7 and remove...

...have existing data that needs to be cleaned, do it in a migration, using MySQL's TRIM function: class StripWhitespaceFromOrganisation < ActiveRecord::Migration def change update 'UPDATE organisations SET name = TRIM...