why to get the error 'undefined method `write_inheritable_attribute''

I started getting this error message when I attempt to do some rake
tasks:

$ rails destroy scaffold genotypes
/usr/share/rails-ruby1.8/railties/lib/rails_generator/options.rb:32:in
`default_options': undefined method `write_inheritable_attribute' for
Rails::Generator::Base:Class (NoMethodError)
  from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:90:in
`<class:Base>'
  from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:85:in
`<module:Generator>'
  from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:48:in
`<module:Rails>'
  from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:6:in `<top
(required)>'
  from
/home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
  from
/home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
  from /usr/share/rails-ruby1.8/railties/lib/rails_generator.rb:34:in
`<top (required)>'
  from
/home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
  from
/home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
  from /usr/share/rails-ruby1.8/railties/bin/rails:14:in `<main>'
$

I found a related old message here that seemed to indicate my problem
might be caused because I did not install gems as root, so here is what
my gem environment looks like:

$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.21
  - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]
  - INSTALLATION DIRECTORY: /home/caseyr/.rvm/gems/ruby-1.9.3-p194
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /home/caseyr/.rvm/gems/ruby-1.9.3-p194/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /home/caseyr/.rvm/gems/ruby-1.9.3-p194
     - /home/caseyr/.rvm/gems/ruby-1.9.3-p194@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

Can anyone tell if this is incorrect? Do I need to uninstall and
reinstall gems?

Any suggestions much appreciated...

--rick

I started getting this error message when I attempt to do some rake
tasks:

$ rails destroy scaffold genotypes
/usr/share/rails-ruby1.8/railties/lib/rails_generator/options.rb:32:in
`default_options': undefined method `write_inheritable_attribute' for
Rails::Generator::Base:Class (NoMethodError)
from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:90:in
`<class:Base>'
from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:85:in
`<module:Generator>'
from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:48:in
`<module:Rails>'
from
/usr/share/rails-ruby1.8/railties/lib/rails_generator/base.rb:6:in `<top
(required)>'
from
/home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from
/home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from /usr/share/rails-ruby1.8/railties/lib/rails_generator.rb:34:in
`<top (required)>'
from
/home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from
/home/caseyr/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from /usr/share/rails-ruby1.8/railties/bin/rails:14:in `<main>'
$

I found a related old message here that seemed to indicate my problem
might be caused because I did not install gems as root, so here is what
my gem environment looks like:

If you are using rvm then you should not install gems as root. Does
it fix the problem if you do
rvm rake whatever

Colin