Problems install RForum 0.2

When trying to do a clean install of RForum 0.2, rake migrate gives me
the following error:

rake aborted!
Mysql::Error: You have an error in your SQL syntax near ‘ENGINE=InnoDB’
at line 1: CREATE TABLE attachments (id int(11) DEFAULT NULL
auto_increment PRIMARY KEY, created_at datetime NOT NULL, updated_at
datetime NOT NULL, filename varchar(60) NOT NULL, post_id int(11),
position int(11)) ENGINE=InnoDB

  • Something I should do, or is this a bug?

database.yml is correctly filled out and I have created an ‘rforum’
database in mysql (which database.yml points to).

Running Rails 1.0 on FreeBSD 5.3 with mysql 3.23.

zero halo wrote:

When trying to do a clean install of RForum 0.2, rake migrate gives me
the following error:

rake aborted!
Mysql::Error: You have an error in your SQL syntax near ‘ENGINE=InnoDB’
at line 1: CREATE TABLE attachments (id int(11) DEFAULT NULL
auto_increment PRIMARY KEY, created_at datetime NOT NULL, updated_at
datetime NOT NULL, filename varchar(60) NOT NULL, post_id int(11),
position int(11)) ENGINE=InnoDB

I should have included the trace:

/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract_adapter.rb:88:in
log' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:180:inexecute’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:94:in
create_table' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:283:increate_table’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/migration.rb:170:in
send' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/migration.rb:170:inmethod_missing’
./db/migrate//001_initial.rb:6:in up' ./db/migrate//001_initial.rb:4:ininstance_eval’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/schema.rb:43:in
instance_eval' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/schema.rb:43:indefine’
./db/migrate//001_initial.rb:4:in up' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/migration.rb:228:insend’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/migration.rb:228:in
migrate' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/migration.rb:223:ineach’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/migration.rb:223:in
migrate' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/migration.rb:190:inup’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/migration.rb:181:in
migrate' /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/tasks/databases.rake:3 /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/tasks/databases.rake:2:incall’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:202:in
execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:202:ineach’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:202:in
execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:180:ininvoke’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:1454:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:1454:ineach’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake.rb:1454:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/bin/rake:7 /usr/local/bin/rake:18:inload’
/usr/local/bin/rake:18

To answer my own question, it seems that Rails migrations choke in mysql
3.23. Details here:
http://rails.techno-weenie.net/question/2005/12/25/migrations_with_mysql_3_23.

zero halo wrote:

When I run ./script/server, I just get the following:
=> Booting WEBrick…

However, WEBrick doesn’t actually boot. The odd thing is that I already
have 3 instances of WEBrick running (two instances of Instiki, plus my
own Rails app), so I know that WEBrick works on my system. I tried
killing one of 3 running WEBrick processes to see if it would boot then
(in case you can only run so many instances of WEBrick), but the same
results. Has anyone else encountered this?

Not that I know of.

MySQL 3.23 is really old, there might be problems related to that. Could
you try it with SQLite, to rule out any problems with MySQL?

Ok, now that I’ve gotten migrate to work (by editing the migrate files,
adding :options => ‘TYPE=InnoDB’ to each create table line), I’m running
into my next problem.

When I run ./script/server, I just get the following:
=> Booting WEBrick…

However, WEBrick doesn’t actually boot. The odd thing is that I already
have 3 instances of WEBrick running (two instances of Instiki, plus my
own Rails app), so I know that WEBrick works on my system. I tried
killing one of 3 running WEBrick processes to see if it would boot then
(in case you can only run so many instances of WEBrick), but the same
results. Has anyone else encountered this?