Hello,
Here an other strange issue probably related:
When executing “ruby script/generate model Namespace::Person” the
script create (as expected) “./models/namespace/person.rb”. Also a
migration file is created. The migration file create a table named
“namespace_people”.
I I run the console and try to create a new instance of
“Namespace::Person” I get an exception:
ns = Namespace::Person.new
ns = Namespace::Person.new
ActiveRecord::StatementInvalid: Mysql::Error: #42S02Table
‘testdocument_development.people’ doesn’t exist: SHOW FIELDS FROM
people
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/abstract_adapter.rb:128:in `log’
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/mysql_adapter.rb:243:in `execute’
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/connection_adapters/mysql_adapter.rb:348:in `columns’
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:763:in `columns’
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:2060:in
`attributes_from_column_definition_without_lock’
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/locking/optimistic.rb:45:in
`attributes_from_column_definition’
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/base.rb:1502:in `initialize_without_callbacks’
from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/
active_record/callbacks.rb:225:in `initialize’
from (irb):1:in `new'
from (irb):1
On Aug 31, 2:39 pm, “[email protected]”