Install the following:
- Git
- rbenv
- Ruby
- MySQL
- PostgreSQL
- SQLite3
- Memcached
cd rails/activesupport
rake test
cd rails/activerecord
rake test
Error:
Access denied for user ''@'localhost' to database 'activerecord_unittest' (Mysql::Error)
Solution:
mysql -uroot
mysql> GRANT ALL PRIVILEGES ON activerecord_unittest.* to 'rails'@'localhost';
mysql> GRANT ALL PRIVILEGES ON activerecord_unittest2.* to 'rails'@'localhost';
mysql> GRANT ALL PRIVILEGES ON inexistent_activerecord_unittest.* to 'rails'@'localhost';
Error:
Unknown database 'activerecord_unittest' (ActiveRecord::NoDatabaseError)
Solution:
rake mysql:build_databases
Error:
FATAL: database "activerecord_unittest" does not exist (ActiveRecord::NoDatabaseError)
Solution:
rake postgresql:build_databases
test_mysql, test_mysql2
DefaultsTestWithoutTransactionalFixtures#test_mysql_text_not_null_defaults_non_strict:
ActiveRecord::StatementInvalid: Mysql::Error: Field 'non_null_text' doesn't have a default value: INSERT INTO `test_mysql_text_not_null_defaults` VALUES ()
test_postgresql
TimestampTest#test_bc_timestamp:
ActiveRecord::StatementInvalid: PG::DatetimeFieldOverflow: ERROR: date/time field value out of range: "0000-01-01 07:59:59.000000 BC": INSERT INTO "developers" ("created_at", "created_on", "name", "updated_at", "updated_on") VALUES ($1, $2, $3, $4, $5) RETURNING "id"