Hi, I''m on edge and Fuser.find(1) works but Fuser.find(:all) shows the error [1]. Fuser is declared here [2]. Do you know what''s happening? Thanks. [1] ActiveResource::ServerError: Failed with 500 Internal Server Error from /.../vendor/rails/activeresource/lib/active_resource/connection.rb:124:in `handle_response'' from /.../vendor/rails/activeresource/lib/active_resource/connection.rb:103:in `request'' from /.../vendor/rails/activeresource/lib/active_resource/connection.rb:74:in `get'' from /.../vendor/rails/activeresource/lib/active_resource/base.rb:442:in `find_every'' from /.../vendor/rails/activeresource/lib/active_resource/base.rb:385:in `find'' from (irb):2 [2] class FuserResource < ActiveResource::Base self.site = "http://localhost:3000/" end class Fuser < FuserResource end -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Héctor Pérez Arenas
2007-Sep-22 14:03 UTC
Re: ActiveResource, find(1) works but no find(:all)
The error is [3] instead of [1], sorry. The method collect belongs to the module Enumerable, but no collect!. Is it exist or not? [3] NoMethodError: undefined method `collect!'' for #<Hash:0xb7539e60> from /.../vendor/rails/activeresource/lib/active_resource/base.rb:465:in `instantiate_collection'' from /.../vendor/rails/activeresource/lib/active_resource/base.rb:442:in `find_every'' from /.../vendor/rails/activeresource/lib/active_resource/base.rb:385:in `find'' from (irb):4 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
According to the ruby docs, collect! is defined under Array not Hash. Héctor Pérez Arenas wrote:> The error is [3] instead of [1], sorry. The method collect belongs to > the module Enumerable, but no collect!. Is it exist or not? > > [3] > > NoMethodError: undefined method `collect!'' for #<Hash:0xb7539e60> > from > /.../vendor/rails/activeresource/lib/active_resource/base.rb:465:in > `instantiate_collection'' > from > /.../vendor/rails/activeresource/lib/active_resource/base.rb:442:in > `find_every'' > from > /.../vendor/rails/activeresource/lib/active_resource/base.rb:385:in > `find'' > from (irb):4 >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Héctor Pérez Arenas
2007-Sep-23 09:30 UTC
Re: ActiveResource, find(1) works but no find(:all)
Therefore... Is ActiveResource wrong? or what am I missing? William Pratt wrote:> According to the ruby docs, collect! is defined under Array not Hash.-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Héctor Pérez Arenas
2007-Sep-24 10:17 UTC
Re: ActiveResource, find(1) works but no find(:all)
http://dev.rubyonrails.org/ticket/8798 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---