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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s