rakoonise
rakoonise

Reputation: 539

Routes work locally but not on Heroku - thinks some are GET when they're POST or DELETE

So I've been regularly pushing my app to heroku and haven't had an issue with the app until now. It all works just fine locally but when I push to heroku now, some of the routes don't work. All GET routes work just fine but other ones like logout (DELETE) fail. My logs say that it couldn't find the /logout GET route even when I clearly made it a DELETE operation. Again, this all works locally and the logout functionality has been there for a while and I've never had an issue with it on heroku before.

I did try messing around with some asset precompiling but I don't understand how that would've affected my app in this way.

This happens with more than just the logout route but I'll use it as the main example: In my haml file:

%li.logout{ :class => 'pull-right' }
          =link_to("Logout", "/logout", :method => :delete)

rake routes (which is the same when I run heroku run rake routes):

logout DELETE   /logout(.:format)                                                   
users#logout

When I run "git push heroku master" it just says everything is up to date.

Does anyone have an idea of what could be happening? I don't even know what to try next.

Upvotes: 0

Views: 111

Answers (1)

rakoonise
rakoonise

Reputation: 539

It turned out to be an issue with jQuery. We were downloading the javascript things in the wrong order.

Upvotes: 1

Related Questions