Rails 3 bug: undefined method `<=>' for class `ActiveSupport::Multibyte::Chars'

I’m getting the following bug when I try to run rake db:migrate in
Rails 3 beta 4:

$ rake db:migrate --trace
(in C:/Users/Adam/Documents/Aptana Workspace/QuestionBank)
default formats are encoded in ISO-8859-1
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateUsers: migrating

– create_table(:users)
rake aborted!
An error has occurred, all later migrations canceled:

undefined method <=>' for classActiveSupport::Multibyte::Chars’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta4/lib/
active_support/multibyte/chars.rb:49:in <class:Chars>' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta4/lib/ active_support/multibyte/chars.rb:36:inmodule:Multibyte
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta4/lib/
active_support/multibyte/chars.rb:6:in <module:ActiveSupport>' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0.beta4/lib/ active_support/multibyte/chars.rb:5:in<top (required)>’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/connection_adapters/abstract/quoting.rb:13:in quote' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/connection_adapters/mysql_adapter.rb:196:inquote’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/connection_adapters/abstract/schema_statements.rb:450:in
add_column_o ptions!' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/connection_adapters/abstract/schema_definitions.rb: 286:inadd_column_
options!’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/connection_adapters/abstract/schema_definitions.rb:
279:in to_sql' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/connection_adapters/abstract/schema_definitions.rb: 529:inmap’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/connection_adapters/abstract/schema_definitions.rb:
529:in to_sql' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/connection_adapters/abstract/schema_statements.rb:117:increate_table

c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/connection_adapters/mysql_adapter.rb:442:in
create_table' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/migration.rb:356:inblock in method_missing’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/migration.rb:332:in block in say_with_time' c:/Ruby191/lib/ruby/1.9.1/benchmark.rb:294:inmeasure’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/migration.rb:332:in say_with_time' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/migration.rb:352:inmethod_missing’
C:/Users/Adam/Documents/Aptana Workspace/QuestionBank/db/migrate/
20100715154624_create_users.rb:3:in up' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/migration.rb:285:inblock in migrate’
c:/Ruby191/lib/ruby/1.9.1/benchmark.rb:294:in measure' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/migration.rb:285:inmigrate’
c:0:in migrate' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/migration.rb:510:inblock (2 levels) in migrate’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/migration.rb:586:in call' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/migration.rb:586:inddl_transaction’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/migration.rb:509:in block in migrate' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/migration.rb:496:ineach’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/migration.rb:496:in migrate' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/migration.rb:406:inup’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/
active_record/migration.rb:388:in migrate' c:/Ruby191/lib/ruby/gems/1.9.1/gems/activerecord-3.0.0.beta4/lib/ active_record/railties/databases.rake:140:inblock (2 levels) in <top
(required)>’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in
call' c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:inblock in execute’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in
each' c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:inexecute’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in
block in invoke_with_call_chain' c:/Ruby191/lib/ruby/1.9.1/monitor.rb:190:inmon_synchronize’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:ininvoke’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:inblock (2 levels) in top_level’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in
each' c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:inblock in top_level’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:intop_level’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in
block in run' c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in
run' c:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in<top
(required)>’
c:/Ruby191/bin/rake:19:in load' c:/Ruby191/bin/rake:19:in

There’s nothing fancy in the migration files as far as I can see, just
a very basic table setup. I’ve tried this with ruby 1.8.7, 1.9.1 and
1.9.2, and using both mysql and sqlite. Any ideas?

Adam

An update on this - it seems to work if the line “undef <=>” is
removed from ActiveSupport::Multibyte::Chars

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs