jeudi 11 mai 2017

Rails route not found even when its present

My following API route is not found when hit with CURL or POSTMAN client

Started POST "/api/users/register_handheld" for 181.74.100.34 at 2017-05-11 11:27:42 +0000
DEBUG: Chewy strategies stack: [2] <- atomic @ /home/deploy/boold/shared/bundle/ruby/2.2.0/gems/chewy-0.8.4/lib/chewy/railtie.rb:17

ActionController::RoutingError (No route matches [POST] "/api/users/register_handheld"):

But when i check my routes using routes this URL is present.

enter image description here

This URL actually works if I hit in rails console

app.post "/api/users/register_handheld"
Started POST "/api/users/register_handheld" for 127.0.0.1 at 2017-05-11 11:21:03 +0000
DEBUG: Chewy strategies stack: [3] <- atomic @ /home/deploy/boold/shared/bundle/ruby/2.2.0/gems/chewy-0.8.4/lib/chewy/railtie.rb:17
Processing by Crowd::Api::V1::HandheldUsersController#create as JSON

Aucun commentaire:

Enregistrer un commentaire