Mysql/test error

1 view
Skip to first unread message

greg.p...@gmail.com

unread,
Apr 29, 2009, 2:54:37 PM4/29/09
to Orlando Ruby Users Group Discussion
Has anybody encountered and resolved the below error?

greg-pedersons-computer:nsight_dev gspederson$ rake test:units
(in /Users/gspederson/rails_apps/nsight_dev)
rake aborted!
Mysql::Error: Specified key was too long; max key length is 767 bytes:
CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations`
(`version`)

(See full trace by running task with --trace)


I could only find discussion/debate about this and also a couple of
tickets on lighthouse - #522 which is marked as a duplicate to #1543.
Ticket #1543 seems to suggest making the following changes to
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
connection_adapters/abstract/schema_statements.rb

add_index sm_table, :version, :unique => true,
- :name => 'unique_schema_migrations'
+ :name => Base.table_name_prefix +
'unique_schema_migrations' + Base.table_name_suffix

I did try this, but still get the Mysql error.

I've got Mysql 6.0.5 and Rails 2.3.2

Thanks,
Greg
Reply all
Reply to author
Forward
0 new messages