I tried to post this 2 days ago but got bounced because the mail was too big. I''ve gzipped the attachment so it could pass the size limits now. --------------------------------------------- Hi there. (first post here). I have Ubuntu 5.10, Ruby 1.8.3 and Rake 0.7.0 (Should I specify anything else?) I''ve downloaded trunk rails Yesterday from SVN following instructions on http://dev.rubyonrails.org/ First, I''m getting an error while executing the mysql.sql commands: ERROR 1005: Can''t create table ''./activerecord_unittest/fk_test_has_fk.frm'' (errno: 150) I configured mysql''s connection.rb to suit my system and tried to run the tests, but at the end I get: 705 tests, 2080 assertions, 35 failures, 35 errors I obviously suspect all failures and errors are related to the fk_test_has_fk table, so I created it without the foreign key constraint and tried again with no better results. I know it''s long, but I think i''d better show you my failed testing session... diego@antu:~/rails/trunk/activerecord$ sudo mysqladmin -p create activerecord_unittest Enter password: diego@antu:~/rails/trunk/activerecord$ sudo mysqladmin -p create activerecord_unittest2 Enter password: diego@antu:~/rails/trunk/activerecord$ mysql -u rails activerecord_unittest Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 to server version: 4.0.24_Debian-10ubuntu2-log Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer. mysql> \. test/fixtures/db_definitions/mysql.sql ... Query OK, 0 rows affected (0.12 sec) ERROR 1005: Can''t create table ''./activerecord_unittest/fk_test_has_fk.frm'' (errno: 150) Query OK, 0 rows affected (0.11 sec) ... mysql> Bye diego@antu:~/rails/trunk/activerecord$ mysql -u rails activerecord_unittest2 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 13 to server version: 4.0.24_Debian-10ubuntu2-log Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer. mysql> \. test/fixtures/db_definitions/mysql2.sql Query OK, 0 rows affected (0.19 sec) mysql> Bye diego@antu:~/rails/trunk/activerecord$ sudo rake AR_TX_FIXTURES=yes test_mysql 2>&1 >rake.out /usr/bin/ruby1.8 -Ilib:test:test/connections/native_mysql "/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader.rb" "test/base_test.rb" "test/associations_extensions_test.rb" "test/deprecated_associations_test.rb" "test/aaa_create_tables_test.rb" "test/ar_schema_test.rb" "test/mixin_test.rb" "test/locking_test.rb" "test/reflection_test.rb" "test/associations_join_model_test.rb" "test/associations_test.rb" "test/unconnected_test.rb" "test/column_alias_test.rb" "test/defaults_test.rb" "test/fixtures_test.rb" "test/threaded_connections_test.rb" "test/schema_dumper_test.rb" "test/callbacks_test.rb" "test/adapter_test.rb" "test/readonly_test.rb" "test/pk_test.rb" "test/class_inheritable_attributes_test.rb" "test/binary_test.rb" "test/deprecated_finder_test.rb" "test/associations_go_eager_test.rb" "test/migration_test.rb" "test/inheritance_test.rb" "test/lifecycle_test.rb" "test/multiple_db_test.rb" "test/mixin_nested_set_test.rb" "test/method_scoping_test.rb" "test/finder_test.rb" "test/modules_test.rb" "test/transactions_test.rb" "test/aggregations_test.rb" "test/association_callbacks_test.rb" "test/validations_test.rb" diego@antu:~/rails/trunk/activerecord$ (rake.out is attached). Thank you, Diego _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
Are you using the Rails provided MySQL driver? Or have you installed the native gem? Bob Silva http://www.railtie.net/> -----Original Message----- > From: rails-core-bounces@lists.rubyonrails.org [mailto:rails-core- > bounces@lists.rubyonrails.org] On Behalf Of Diego Algorta Casamayou > Sent: Tuesday, February 14, 2006 3:36 AM > To: rails-core@lists.rubyonrails.org > Subject: [Rails-core] AR UnitTests failing... > > I tried to post this 2 days ago but got bounced because the mail was > too big. I''ve gzipped the attachment so it could pass the size limits > now. > --------------------------------------------- > Hi there. > > (first post here). > > I have Ubuntu 5.10, Ruby 1.8.3 and Rake 0.7.0 > (Should I specify anything else?) > > I''ve downloaded trunk rails Yesterday from SVN following instructions > on http://dev.rubyonrails.org/ > > First, I''m getting an error while executing the mysql.sql commands: > > ERROR 1005: Can''t create table > ''./activerecord_unittest/fk_test_has_fk.frm'' (errno: 150) > > I configured mysql''s connection.rb to suit my system and tried to run > the tests, but at the end I get: > > 705 tests, 2080 assertions, 35 failures, 35 errors > > I obviously suspect all failures and errors are related to the > fk_test_has_fk table, so I created it without the foreign key > constraint and tried again with no better results. > > I know it''s long, but I think i''d better show you my failed testing > session... > > > diego@antu:~/rails/trunk/activerecord$ sudo mysqladmin -p create > activerecord_unittest > Enter password: > diego@antu:~/rails/trunk/activerecord$ sudo mysqladmin -p create > activerecord_unittest2 > Enter password: > diego@antu:~/rails/trunk/activerecord$ mysql -u rails > activerecord_unittest > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 12 to server version: 4.0.24_Debian-10ubuntu2- > log > > Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer. > > mysql> \. test/fixtures/db_definitions/mysql.sql > ... > Query OK, 0 rows affected (0.12 sec) > > ERROR 1005: Can''t create table > ''./activerecord_unittest/fk_test_has_fk.frm'' (errno: 150) > Query OK, 0 rows affected (0.11 sec) > ... > mysql> Bye > diego@antu:~/rails/trunk/activerecord$ mysql -u rails > activerecord_unittest2 > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 13 to server version: 4.0.24_Debian-10ubuntu2- > log > > Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer. > > mysql> \. test/fixtures/db_definitions/mysql2.sql > Query OK, 0 rows affected (0.19 sec) > > mysql> Bye > diego@antu:~/rails/trunk/activerecord$ sudo rake AR_TX_FIXTURES=yes > test_mysql 2>&1 >rake.out > /usr/bin/ruby1.8 -Ilib:test:test/connections/native_mysql > "/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader.rb" > "test/base_test.rb" "test/associations_extensions_test.rb" > "test/deprecated_associations_test.rb" > "test/aaa_create_tables_test.rb" "test/ar_schema_test.rb" > "test/mixin_test.rb" "test/locking_test.rb" "test/reflection_test.rb" > "test/associations_join_model_test.rb" "test/associations_test.rb" > "test/unconnected_test.rb" "test/column_alias_test.rb" > "test/defaults_test.rb" "test/fixtures_test.rb" > "test/threaded_connections_test.rb" "test/schema_dumper_test.rb" > "test/callbacks_test.rb" "test/adapter_test.rb" > "test/readonly_test.rb" "test/pk_test.rb" > "test/class_inheritable_attributes_test.rb" "test/binary_test.rb" > "test/deprecated_finder_test.rb" "test/associations_go_eager_test.rb" > "test/migration_test.rb" "test/inheritance_test.rb" > "test/lifecycle_test.rb" "test/multiple_db_test.rb" > "test/mixin_nested_set_test.rb" "test/method_scoping_test.rb" > "test/finder_test.rb" "test/modules_test.rb" > "test/transactions_test.rb" "test/aggregations_test.rb" > "test/association_callbacks_test.rb" "test/validations_test.rb" > diego@antu:~/rails/trunk/activerecord$ > > (rake.out is attached). > > Thank you, > Diego
2006/2/14, Bob Silva <me@bobsilva.com>:> Are you using the Rails provided MySQL driver? Or have you installed the > native gem?I''ve tried both with same luck. I think I should first solve the problem while creating the database structure. I still have problems with the fk_test_has_fk table: diego@antu:~/devel/rails/trunk/activerecord$ mysql -u rails activerecord_unittest < test/fixtures/db_definitions/mysql.sql ERROR 1005 at line 194: Can''t create table ''./activerecord_unittest/fk_test_has_fk.frm'' (errno: 150) diego@antu:~/devel/rails/trunk/activerecord$ I can''t find this error anywhere in google relating to rails so it must be something in my configuration, but I don''t know what. Diego
Well I''ve got some news. It seems the problem is related with the SQL syntax used in the mysql.sql file not being 100% compatible with mysql 4.0.24 (I''m using MySQL 4.0.24_Debian-10ubuntu2-log from Ubuntu linux 5.10). I''m sending a patch attached. With that modification, all tests run fine... if I run them as root. But if I run them as a normal user I have 2 errors: diego@antu:~/devel/rails/trunk/activerecord$ rake test_mysql (in /home/diego/devel/rails/trunk/activerecord) /usr/bin/ruby1.8 -Ilib:test:test/connections/native_mysql "/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader.rb" "test/base_test.rb" "test/associations_extensions_test.rb" "test/deprecated_associations_test.rb" "test/aaa_create_tables_test.rb" "test/ar_schema_test.rb" "test/mixin_test.rb" "test/locking_test.rb" "test/reflection_test.rb" "test/associations_join_model_test.rb" "test/associations_test.rb" "test/unconnected_test.rb" "test/column_alias_test.rb" "test/defaults_test.rb" "test/fixtures_test.rb" "test/threaded_connections_test.rb" "test/schema_dumper_test.rb" "test/callbacks_test.rb" "test/adapter_test.rb" "test/readonly_test.rb" "test/pk_test.rb" "test/class_inheritable_attributes_test.rb" "test/binary_test.rb" "test/deprecated_finder_test.rb" "test/associations_go_eager_test.rb" "test/migration_test.rb" "test/inheritance_test.rb" "test/lifecycle_test.rb" "test/multiple_db_test.rb" "test/mixin_nested_set_test.rb" "test/method_scoping_test.rb" "test/finder_test.rb" "test/modules_test.rb" "test/transactions_test.rb" "test/aggregations_test.rb" "test/association_callbacks_test.rb" "test/validations_test.rb" Using native MySQL Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader Started ..................................................E...................................................................................................................................................................................E.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... Finished in 43.050045 seconds. 1) Error: test_storing_in_pstore(AssociationsTest): Errno::EPERM: Operation not permitted - /tmp/ar-pstore-association-test ./test/associations_test.rb:49:in `delete'' ./test/associations_test.rb:49:in `test_storing_in_pstore'' 2) Error: test_storing_in_pstore(DeprecatedAssociationsTest): Errno::EACCES: Permission denied - /tmp/ar-pstore-association-test /usr/lib/ruby/1.8/pstore.rb:101:in `initialize'' /usr/lib/ruby/1.8/pstore.rb:101:in `transaction'' ./test/deprecated_associations_test.rb:304:in `test_storing_in_pstore'' 705 tests, 2275 assertions, 0 failures, 2 errors rake aborted! Command failed with status (1): [/usr/bin/ruby1.8 -Ilib:test:test/connectio...] (See full trace by running task with --trace) Hopping to be useful here... Diego 2006/2/15, Diego Algorta Casamayou <diego.algorta@gmail.com>:> 2006/2/14, Bob Silva <me@bobsilva.com>: > > Are you using the Rails provided MySQL driver? Or have you installed the > > native gem? > > I''ve tried both with same luck. > > I think I should first solve the problem while creating the database > structure. I still have problems with the fk_test_has_fk table: > > diego@antu:~/devel/rails/trunk/activerecord$ mysql -u rails > activerecord_unittest < test/fixtures/db_definitions/mysql.sql > ERROR 1005 at line 194: Can''t create table > ''./activerecord_unittest/fk_test_has_fk.frm'' (errno: 150) > diego@antu:~/devel/rails/trunk/activerecord$ > > I can''t find this error anywhere in google relating to rails so it > must be something in my configuration, but I don''t know what. > > Diego >_______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
2006/2/15, Diego Algorta Casamayou <diego.algorta@gmail.com>:> Well I''ve got some news. > > [...] > > With that modification, all tests run fine... if I run them as root. > But if I run them as a normal user I have 2 errors:Ok. My fault. I had run it first as root so the file /tmp/ar-pstore-association-test was owned by root and when the tests where ran by my normal user it couldn''t write to it. I removed the file and all tests pass with normal user. Bye Diego