Forum: Ruby on Rails RestClient::ResourceNotFound in UsersController#index

881a236ca533281bb9c9ac92f380b5a0?d=identicon&s=25 prabhu (Guest)
on 2014-04-17 15:17
(Received via mailing list)

I am trying to implement Rest Api for a sample application for learning
purpose. But when I try to make a "GET" request through the RestClient
is showing error as

RestClient::ResourceNotFound in UsersController#index

def index
    uri = "#{API_BASE_URL}/users.json" # specifying json format in the
    rest_resource =, USERNAME, PASSWORD) #
will create new rest-client resource so that we can call different
of it
    users = rest_resource.get
    @users = JSON.parse(users, :symbolize_names => true) # we will
the return data into array of hash.see json data parsing here

Please help.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.