Hi, This is resolved. I copied the 'activeresource-3.0.0' gem folder from the source folder of rails3 and pasted under the 'config/initializers' folder of my rails3 application. So the below code snippet available in application_controler.rb file is working fine as expected.
class ApplicationController < ActionController::Base rescue_from ActiveResource::UnauthorizedAccess, :with => :render_401 end Regards, Seeni Rafiyullah Khan A, <srk...@apigee.com>*In Every moment, thank God.* On Tue, Aug 7, 2012 at 2:21 PM, Colin Law <clan...@googlemail.com> wrote: > On 7 August 2012 09:25, Rafi A <rafigl...@gmail.com> wrote: > > Colin, > > > > Thanks for your reply. Surfed over both sides of Google but not able to > get > > the apt solution. I am using the below code snippet in Application > > controller file so that all the flows will inherit. > > > > 'rescue_from ActiveResource::UnauthorizedAccess, :with => :render_401' > > > > But while invoking the application URL, I am getting the error which I > have > > sent in below mail thread. > > You have not shown us the code that is triggering the problem. Also > have a look in the log for the local app and the remote one and see > what is happening. > > I would prefer it if you did not top post please, it makes it easier > to follow the thread. Insert your reply inline in previous message. > Thanks. > > Colin > > > > > Please let me know if you have any ideas. > > > > > > Regards, > > Seeni Rafiyullah Khan A, > > In Every moment, thank God. > > > > > > > > On Tue, Aug 7, 2012 at 1:42 PM, Colin Law <clan...@googlemail.com> > wrote: > >> > >> On 7 August 2012 09:00, Rafi A <rafigl...@gmail.com> wrote: > >> > Hi, > >> > > >> > I am getting the error "uninitialized constant > >> > ActiveResource::UnauthorizedAccess" while executing the rails3 > >> > application. > >> > > >> > Below are my package details: > >> > > >> > Rails 3.0.0 > >> > Ruby 1.8.7 > >> > activeresource (3.0.0, 2.3.4) > >> > > >> > Suggestions are welcome! > >> > >> Start with google for > >> ActiveResource::UnauthorizedAccess > >> That shows lots of hits with various suggestions as to what can cause > >> this. If none of those help then come back but give us some more > >> information about the specific call you are making that is causing the > >> problem. We are not telepathic. > >> > >> Colin > >> > >> > > >> > Regards, > >> > Seeni Rafiyullah Khan A, > >> > In Every moment, thank God. > >> > > >> > -- > >> > 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@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > rubyonrails-talk+unsubscr...@googlegroups.com. > >> > For more options, visit https://groups.google.com/groups/opt_out. > >> > > >> > > >> > >> -- > >> 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@googlegroups.com. > >> To unsubscribe from this group, send email to > >> rubyonrails-talk+unsubscr...@googlegroups.com. > >> For more options, visit https://groups.google.com/groups/opt_out. > >> > >> > > > > -- > > 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@googlegroups.com. > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > 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@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.