[Schemagenerator-users] Issues with schema generator
Paul Hart
mail at paulhart.ca
Mon Dec 19 15:25:01 EST 2005
Scott,
Well, now there's two of us! :)
I'm having problems with the schema generator. As an FYI, I'm attempting
to use it to create my initial schema (so I can start by doing the Right
Thing).
My rails app is configured to use PostgreSQL, and I have the appropriate
gem installed for that (and config/database.yml is pointing in the right
place).
Other environmental stuff: Rails 1.0, Ruby 1.8.3, Gentoo Linux, PowerPC.
I perform the following commands:
rails <appname>
cd <appname>
vi config/database.yml # fix up to point at my PostgreSQL DB
script/generate migration initial_schema
vi db/migrate/001_initial_schema.rb
script/generate schema
If I don't have the mysql gem installed... nothing happens. No output,
no files generated.
If I have the mysql gem installed (version 2.7), I get a nasty stack
trace which I've pasted at the bottom of this message (along with the
rest of the output).
There are a couple of things with this output: firstly, it seems that
the generator isn't picking up the file at all (the migration tool seems
to start at '001' rather than '0' now). Secondly, if I "fix" the
MySqlAdapter call and give it four parameters, then it whines with a
different error.
Suggestions? I'd really like this to work ;)
Thanks,
Paul
Found 0 migration classes
Migrations complete.
Tables found: 0
Indexes found: 0
Records found: 0
exists db
create db/schema.postgresql.sql
create db/schema.mysql.sql
Error: wrong number of arguments (3 for 4)
/usr/lib/ruby/gems/1.8/gems/schema_generator-0.9.0/schema_generator.rb:259:in
`initialize'
/usr/lib/ruby/gems/1.8/gems/schema_generator-0.9.0/schema_generator.rb:259:in
`dump'
(erb):8:in `template'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/commands.rb:271:in
`template'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/commands.rb:221:in
`file'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/commands.rb:219:in
`file'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/commands.rb:218:in
`file'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/commands.rb:268:in
`template'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/manifest.rb:47:in
`send_actions'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/manifest.rb:46:in
`send_actions'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/manifest.rb:31:in
`replay'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/commands.rb:41:in
`invoke!'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/rails_generator/scripts/../scripts.rb:31:in
`run'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/generate.rb:6
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require'
script/generate:3
create db/schema.sqlite.sql
create db/schema.rb
More information about the Schemagenerator-users
mailing list