RestClient::ResourceNotFound in UsersController#index

Hi,

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
it
is showing error as

RestClient::ResourceNotFound in UsersController#index

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

Please help.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs