Forum: Ruby how do i load ActiveSupport::Multibyte

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John G. (Guest)
on 2009-01-19 02:32
Hi, i'm trying to use this method...


require 'active_support'

class String
  def translit
    ActiveSupport::Multibyte::Handlers::UTF8Handler.normalize(self,:d).split(//u).reject
{ |e| e.length > 1 }.join
  end
end


and everytime i run it, it crashes out with ...

/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:442:in
`load_missing_constant': uninitialized constant
ActiveSupport::Multibyte::Handlers (NameError)
  from
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:77:in
`const_missing'
  from filter.rb:35

Now i've got active_support loaded so i should have access to the
Multibyte library, but obviously it needs something else, so how do i
work out what this dependency is and load it?

any ideas?
This topic is locked and can not be replied to.