Require_gem is obsolete. Use gem instead


#1

Good Day!

I am using Rails version 1.2.3 and gem version 0.9.2 and I keep
getting this error:

boot.rb:29:Warning: require_gem is obsolete. Use gem instead.

Then what I did is I changed “require_gem” to “gem” coz that’s what I
read from most websites having the same error… but after that it gave
me another error:

/usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:266:in load_missing_constant': uninitialized constant ActionMailer (NameError) from /usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:452:inconst_missing’
from /usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:464:in const_missing' from /var/www/rails/camfu-old/config/environment.rb:18 from /usr/lib64/ruby/gems/1.8/gems/rails-1.2.3/lib/ initializer.rb:41:inrun’
from /var/www/rails/camfu-old/config/environment.rb:13
from /usr/lib64/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from /usr/lib64/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from /usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:495:in require' ... 23 levels... from /usr/lib64/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/ server.rb:39 from /usr/lib64/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from /usr/lib64/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’
from script/server:3

Has this happened to anyone?
Any Help would be deeply appreciated. Thank You.


#2

Yes, this is a know issue. If I remember correctly you need to make
sure you are using the latest version of rake, gems, etc. And update
your project code by setting the environment.rb to use Rails 1.2.3.

Then execute “rake rails:update” from inside your project. If
everything is updated properly this warning will go away.