Am I the only one with this problem: I create a new app using "rails appname". I create a dev database, a table, then generate a model for the table and a controller for the app. The app works in the browser. I can create objects, and so forth. Then I create a test database, and run "rake", which says: rake aborted! undefined method `+'' for nil:NilClass ./rakefile:93 The error stems from the method structure_dump in mysql_adapter.rb, and as far as I can tell, it enumerates every table name returned from "SHOW TABLES", injecting an empty string to which it adds the result from every "SHOW CREATE TABLE". Why this fails, I don''t know. Anyone? /P.
I don''t know if this is the exact reason, but when I upgraded to MySQL 4.1.9 I got that error. Only when I down graded did it go away. On Jan 22, 2005, at 1:09 AM, Peter Lindberg wrote:> Am I the only one with this problem: > > I create a new app using "rails appname". I create a dev database, a > table, then generate a model for the table and a controller for the > app. > > The app works in the browser. I can create objects, and so forth. > > Then I create a test database, and run "rake", which says: > > rake aborted! > undefined method `+'' for nil:NilClass > ./rakefile:93 > > The error stems from the method structure_dump in mysql_adapter.rb, > and as far as I can tell, it enumerates every table name returned from > "SHOW TABLES", injecting an empty string to which it adds the result > from every "SHOW CREATE TABLE". Why this fails, I don''t know. > > Anyone? > > /P. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
* Peter Lindberg <plindberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [0109 09:09]:> Am I the only one with this problem: > > I create a new app using "rails appname". I create a dev database, a > table, then generate a model for the table and a controller for the > app. > > The app works in the browser. I can create objects, and so forth. > > Then I create a test database, and run "rake", which says: > > rake aborted! > undefined method `+'' for nil:NilClass > ./rakefile:93Have you got all three databases defined in databases.yml ? I had this until I added the test database. -- ''When you have to kill a man it costs nothing to be polite.'' -- Winston Churchill, On formal declarations of war Rasputin :: Jack of All Trades - Master of Nuns