just replace the line with

rails_gem = Gem.cache.search(Gem::Dependency.new('rails', 
"~>#{version}.0")).sort_by { |g| g.version.version }.last

Note that the two string parameters to search() are wrapped in a 
Gem::Dependency object. Strange refactoring, took me quite a while.

HTH, Thomas


lunaclaire wrote:
> I'm running into problems with some of my rake tasks and I think it's
> since my host updated rubygems to v 1.3.0.
> 
> Has anybody else seen this message?
> 
>    Gem::SourceIndex#search support for String patterns is deprecated
> 
>    ./script/../config/boot.rb:26 is outdated
> 
> 
> that line of code is as follows:
> 
>    rails_gem = Gem.cache.search('rails', "~>#{version}.0").sort_by { |
> g| g.version.version }.last
> 
> I doint think it's affecting my main app code... only the rake tasks.
> 
> Any ideas on what happended? Or how to fix this?

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to