How to employ and run your tests with parallel_tests to speed up test execution

Posted Almost 13 years ago by Ulrich Berkmueller.

...NUMBER'] %> appended to the database name in the test section. # ./config/database.yml ... test: &TEST adapter: mysql database: my_database_name_test<%= ENV['TEST_ENV_NUMBER'] %> encoding: utf8 username: xxx password: yyy...

How to translate “business value” of things that are technically important

Posted About 13 years ago by Lexy.
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...

Why preloading associations "randomly" uses joined tables or multiple queries

Posted About 13 years ago by Henning Koch.

...will make ActiveRecord join the notes and authors tables and the query will fail: Mysql::Error: Column 'created_at' in order clause is ambiguous Unless you have a test covering...

Define an array condition that selects on dynamic columns

Posted Over 13 years ago by Arne Hartherz.

...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...

Bundler for Rails 2.3.x

Posted Over 13 years ago by Thomas Eisenbarth.

...the Rails 2.3.8 gem." you forgot to bundle Rails. If you see "Missing the mysql gem", bundle that as well. Add both Gemfile as well as Gemfile.lock to the repository...

Upgrading Ruby from 1.8.7 to 2.3.5

Posted Over 5 years ago by Dominik Schöler.

...e.g. rails console staging Gem updates Replace ruby-debug with byebug or pry Replace mysql with mysql2, '< 0.3' Remove oniguruma Remove net-ssh and net-scp Remove fastercsv Remove cucumber...

Upgrade from Ruby 1.8.7 to 2.1.5 – an incomplete guide

Posted Over 8 years ago.

...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...

BigDecimal arithmetic in Ruby

Posted Almost 13 years ago by Henning Koch.

...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...

Understanding database cleaning strategies in tests

Posted Over 11 years ago by Henning Koch.

...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

Automatically strip all string fields of an ActiveRecord

Posted Over 11 years ago by Henning Koch.

...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...