Routing Error – No Route Matches [Post] “orders/new”

I ran into a fairly common routing error this morning, thankfully these are fairly easy to fix – usually!

Routing Error
No route matches [POST] “/orders/new”

Simply add the following the route to your routes.rb file:


controller :orders do
post ‘orders/new’ => ‘orders#new’

You may also have to restart WEBrick for this new route to take affect. Good Luck!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.