[Rails] Gem::Dependency#version_requirements is deprecated...

15 views
Skip to first unread message

Rick

unread,
May 11, 2010, 10:14:29 AM5/11/10
to Ruby on Rails: Talk
Seen when running scripts/console, Ruby version not important.

What is this telling me?

Loading development environment (Rails 2.3.5)
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/
gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is
deprecated and will be removed on or after August 2010. Use
#requirement

Checking gem_dependency.rb shows:

118: def requirement
119: r = version_requirements
120: (r == Gem::Requirement.default) ? nil : r
121: end

which function, if commented out, shuts off the warning. Of course,
replacing "version_requirements" with "requirement" produces the
expected recursive stack level error.

Any thoughts?

Rick

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Prabu Duraisamy

unread,
Jul 13, 2010, 2:56:30 PM7/13/10
to rubyonra...@googlegroups.com
Rick Lloyd wrote:
> Seen when running scripts/console, Ruby version not important.
>
> What is this telling me?
>
> Loading development environment (Rails 2.3.5)
> /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/
> gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is
> deprecated and will be removed on or after August 2010. Use
> #requirement
>
> Checking gem_dependency.rb shows:
>
> 118: def requirement
> 119: r = version_requirements
> 120: (r == Gem::Requirement.default) ? nil : r
> 121: end
>
> which function, if commented out, shuts off the warning. Of course,
> replacing "version_requirements" with "requirement" produces the
> expected recursive stack level error.
>
> Any thoughts?
>
> Rick

Hi

Its may be problem of gem version you have installed.
I have also face same problem with rails 2.3.2 and gem 1.3.7.
Solution may here it is follow the URL
http://github.com/rails/rails/commit/268c9040d5c3c7ed30f3923eee71a78eeece8a8a

But I get an another error `method_defined?' for
#<Rails::GemDependency:0x2da16d0> (NoMethodError)

Any Solution for this?

Thanks in advance
--
Posted via http://www.ruby-forum.com/.

Reply all
Reply to author
Forward
0 new messages