NameError: uninitialized constant Inflector

I follwed the example here:
http://dekstop.de/weblog/2005/12/rails_inflector_in_ruby_scripts/

#!/usr/bin/ruby
require 'rubygems'
require 'active_support/inflector'
puts Inflector.singularize('inflections')

I loaded it into irb and wrote a killer script both of which worked
perfectly for weeks.

Now when I try and run the script or run these simple example lines of
code it doesn't work anymore. And I can't for the life of me figure
out what I changed to break it! The last line gives me this error:

irb(main):003:0> puts Inflector.singularize('inflections')
NameError: uninitialized constant Inflector
        from (irb):3

Does anybody know what might cause this? Is it a new plugin (like
action-mailer) that I installed? Is it a bad environmental
variable?

Thanks,

Dave

Quoting dschruth <dschruth@gmail.com>:

I follwed the example here:
http://dekstop.de/weblog/2005/12/rails_inflector_in_ruby_scripts/

#!/usr/bin/ruby
require 'rubygems'
require 'active_support/inflector'
puts Inflector.singularize('inflections')

I loaded it into irb and wrote a killer script both of which worked
perfectly for weeks.

Now when I try and run the script or run these simple example lines of
code it doesn't work anymore. And I can't for the life of me figure
out what I changed to break it! The last line gives me this error:

irb(main):003:0> puts Inflector.singularize('inflections')
NameError: uninitialized constant Inflector
        from (irb):3

Probably you updated Rails to 2.1.1. The above usage is now deprecated and
gives a warning to that effect in Rails. Don't know why no warning in
straight Ruby. Anyway, try

puts ActiveSupport::Inflector.singularize('inflections')

HTH,
  Jeffrey

thanks that worked!