Rails/Gem errors?

Is anyone else getting annoying warning messages?

/usr/local/bin/rails:17:Warning: require_gem is obsolete. Use gem
instead.

I get these messages when using the rails command, rake, script/generate
etc etc.

I’m using Rails 1.2.1

David W. wrote:

Is anyone else getting annoying warning messages?

/usr/local/bin/rails:17:Warning: require_gem is obsolete. Use gem
instead.

I get these messages when using the rails command, rake, script/generate
etc etc.

I’m using Rails 1.2.1

You can fix it in environment.rb. Find the ‘require_gem’ lines and
replace them with ‘gem’

David W. wrote:

Is anyone else getting annoying warning messages?

/usr/local/bin/rails:17:Warning: require_gem is obsolete. Use gem
instead.

I get these messages when using the rails command, rake, script/generate
etc etc.

I’m using Rails 1.2.1

This has more to do with the new rubygems than rails - new versions of
everything seem to be coming out at once!

David W. wrote:

Alan F. wrote:

You can fix it in environment.rb. Find the ‘require_gem’ lines and
replace them with ‘gem’

Actually, do:

gem pristine --all

From: http://comments.gmane.org/gmane.comp.lang.ruby.rails/117220

I don’t think that’ll work. I did it on my machine immediatly I upgraded
gems, and still had to fix my rails app.

I got the impression it only fixed the binstubs - ‘rails’, ‘rake’, ‘cap’
etc I dont think it’ll search out uses of require_gem in rb files on
your machine ?

A.

Alan F. wrote:

David W. wrote:

Is anyone else getting annoying warning messages?

/usr/local/bin/rails:17:Warning: require_gem is obsolete. Use gem
instead.

I get these messages when using the rails command, rake, script/generate
etc etc.

I’m using Rails 1.2.1

You can fix it in environment.rb. Find the ‘require_gem’ lines and
replace them with ‘gem’

Actually, do:

gem pristine --all

From: http://comments.gmane.org/gmane.comp.lang.ruby.rails/117220

Alan F. wrote:

David W. wrote:

Alan F. wrote:

You can fix it in environment.rb. Find the ‘require_gem’ lines and
replace them with ‘gem’

Actually, do:

gem pristine --all

From: http://comments.gmane.org/gmane.comp.lang.ruby.rails/117220

I don’t think that’ll work. I did it on my machine immediatly I upgraded
gems, and still had to fix my rails app.

I got the impression it only fixed the binstubs - ‘rails’, ‘rake’, ‘cap’
etc I dont think it’ll search out uses of require_gem in rb files on
your machine ?

A.

You’re right. The moment I saw it, I thought it was the ‘official’ fix.
I was wrong. Doing a rake db:migrate produces the warning. Very
irritating.

David W. wrote:

Here’s the ticket for it:

http://dev.rubyonrails.org/ticket/6886

I hope it’ll get fixed soon. It’s very off-putting seeing that warning
each time doing something.

You can fix it by editing your environment.rb as described earlier in
the thread.

A.

Anonymous Coward wrote:

David W. wrote:

Here’s the ticket for it:

http://dev.rubyonrails.org/ticket/6886

I hope it’ll get fixed soon. It’s very off-putting seeing that warning
each time doing something.

You can fix it by editing your environment.rb as described earlier in
the thread.

A.

boot.rb contains the require_gem piece of code.

Here’s the ticket for it:

http://dev.rubyonrails.org/ticket/6886

I hope it’ll get fixed soon. It’s very off-putting seeing that warning
each time doing something.

On Fri, 2007-01-19 at 12:28 +0100, askegg wrote:

This has more to do with the new rubygems than rails - new versions of
everything seem to be coming out at once!


ok, I updated to 0.9.1 and now…

gem pristine --all

Restoring gem(s) to pristine condition…
Rebuilt all bin stubs
All installed gem files are already in pristine condition

gem check

gem update

Updating installed gems…
ERROR: While executing gem … (NoMethodError)
undefined method `refresh’ for #Hash:0xb7d212cc

ugh… anyone know how to fix this?

Craig

On Sat, 2007-01-20 at 10:24 +0100, David W. wrote:

Rebuilt all bin stubs

I’m pretty sure you want to do

sudo gem update

been there and done that…

gem update

Updating installed gems…
ERROR: While executing gem … (NoMethodError)
undefined method `refresh’ for #Hash:0xb7da43d4

this is the only type of gem command that will not toss that error…

gem list

*** LOCAL GEMS ***

actionmailer (1.3.1, 1.2.5)
Service layer for easy email delivery and testing.

actionpack (1.13.1, 1.12.5)
Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.2.1, 1.1.6)
Web service support for Action Pack.

activerecord (1.15.1, 1.14.4)
Implements the ActiveRecord pattern for ORM.

activesupport (1.4.0, 1.3.1)
Support and utility classes used by the Rails framework.

ajax_scaffold_generator (3.1.10)
Ajax scaffold generator is a rails generator for ajaxified scaffolds

mysql (2.6)
MySQL/Ruby provides the same functions for Ruby programs that the
MySQL C API provides for C programs.

postgres (0.7.1)
The extension library to access a PostgreSQL database from Ruby.

rails (1.2.1, 1.1.6)
Web-application framework with template engine, control-flow layer,
and ORM.

rake (0.7.1)
Ruby based make-like utility.

rmagick (1.14.1, 1.13.0)
RMagick is an interface between the Ruby programming language and
the ImageMagick and GraphicsMagick image processing libraries.

sources (0.0.1)
This package provides download sources for remote gem installation

Craig

Craig W. wrote:

On Fri, 2007-01-19 at 12:28 +0100, askegg wrote:

This has more to do with the new rubygems than rails - new versions of
everything seem to be coming out at once!


ok, I updated to 0.9.1 and now…

gem pristine --all

Restoring gem(s) to pristine condition…
Rebuilt all bin stubs
All installed gem files are already in pristine condition

gem check

gem update

Updating installed gems…
ERROR: While executing gem … (NoMethodError)
undefined method `refresh’ for #Hash:0xb7d212cc

ugh… anyone know how to fix this?

Craig

I’m pretty sure you want to do

sudo gem update

On Sat, 2007-01-20 at 10:24 +0100, David W. wrote:

Rebuilt all bin stubs

I’m pretty sure you want to do

sudo gem update

I’m pretty sure that I am not alone with this problem since upgrading to
gem 0.9.1

https://rubyforge.org/tracker/index.php?func=detail&aid=7995&group_id=126&atid=575

Craig

Craig W. wrote:

On Sat, 2007-01-20 at 10:24 +0100, David W. wrote:

Rebuilt all bin stubs

I’m pretty sure you want to do

sudo gem update

I’m pretty sure that I am not alone with this problem since upgrading to
gem 0.9.1

https://rubyforge.org/tracker/index.php?func=detail&aid=7995&group_id=126&atid=575

Craig

Removing

/usr/local/lib/ruby/gems/1.8/source_cache

solved the problem for me.

Guillermo

On Sat, 2007-01-27 at 14:33 +0100, Guillermo Marcus wrote:

https://rubyforge.org/tracker/index.php?func=detail&aid=7995&group_id=126&atid=575

Craig

Removing

/usr/local/lib/ruby/gems/1.8/source_cache

solved the problem for me.


yeah - it solved it for me too - thanks

Craig