Q:

No route matches [POST] "/stories/id/invites"

All of the sudden I am getting this error even though it has been working for a while:

No route matches [POST] “/stories/id/invites”

Routes:
story_invites_path  GET /stories/:story_id/invites(.:format)    invites#index

routes.rb
resources :stories do
  match '/stories/:id/invite', to: 'invite#show', via: 'get'

  resources :invites , only: [:index, :show, :destroy ]
end

invites/index view
<%= form_for @invite , :url => story_invites_path do |f2| %>          
  <%= f2.text_field :user_id, :value => user.id , :class => 'number_field' %>
  <%= f2.submit 'Send', class: 'btn btn-primary' %>
<% end %>

invites controller 
def create
  @invite = @story.invites.new(invite_params)

  if @invite.save
    flash[:success] = 'The user was invited!'
    redirect_to(:back)
  else
    render :new
  end
end

How do I add a post method to my invites path?

A:

You have all sort of icky things...
This: 
resources :stories do
  match '/stories/:id/invite',     to: 'invite#show',       via: 'get'
  resources :invites , only: [:index, :show, :destroy ] 
end

Should be: 
resources :stories do
  resources :invites
end

Which will give you:
     story_invites GET    /stories/:story_id/invites(.:format)            invites#index
                   POST   /stories/:story_id/invites(.:format)            invites#create
  new_story_invite GET    /stories/:story_id/invites/new(.:format)        invites#new
 edit_story_invite GET    /stories/:story_id/invites/:id/edit(.:format)   invites#edit
      story_invite GET    /stories/:story_id/invites/:id(.:format)        invites#show
                   PATCH  /stories/:story_id/invites/:id(.:format)        invites#update
                   PUT    /stories/:story_id/invites/:id(.:format)        invites#update
                   DELETE /stories/:story_id/invites/:id(.:format)        invites#destroy
           stories GET    /stories(.:format)                              stories#index
                   POST   /stories(.:format)                              stories#create
         new_story GET    /stories/new(.:format)                          stories#new
        edit_story GET    /stories/:id/edit(.:format)                     stories#edit
             story GET    /stories/:id(.:format)                          stories#show
                   PATCH  /stories/:id(.:format)                          stories#update
                   PUT    /stories/:id(.:format)                          stories#update
                   DELETE /stories/:id(.:format)                          stories#destroy

If you really want to limit your invite routes, fine. But right now, you're limiting out create. Which is really why you're getting:
No route matches [POST] “/stories/id/invites”

Because you TOLD rails you didn't want a create path. Rails is dumb that way. Does what you tell it. Not what you mean.
Also, this:
match '/stories/:id/invite',     to: 'invite#show',       via: 'get'

Is just really full of badness and banana slugs. Please don't do that. To yourself. Or to us.
This:
<%= form_for @invite , :url => story_invites_path do |f2| %>
  <%= f2.text_field :user_id, :value => user.id , :class => 'number_field' %>
  <%= f2.submit 'Send', class: 'btn btn-primary' %>
<% end %>

probably needs to look more like this:
<%= form_for :invite, story_invites_path(story) do |f2| %>
  <%= f2.hidden_field :invite, :user_id, value: @user.id %>
  <%= f2.submit 'Send', class: 'btn btn-primary' %>
<% end %>

Use :invite instead of @invite because you're in index and you probably don't have an @invite. If you do, fine. But rails can use the symbol to infer the correct fields. 
You're going to have to look up that hidden_field method, because I'm doing this from memory. 
And I don't know where you're going to get story from because you're in your index method. But, you can do something like @stories = Story.all. In which case this whole block will need to wrapped in something like:
<% @stories.each do |story| %>
  <%= story.name %>
  <%= form_for :invite, story_invites_path(story) do |f2| %>
    <%= f2.hidden_field :invite, :user_id, value: @user.id %>
    <%= f2.submit 'Send', class: 'btn btn-primary' %>
  <% end %>
<% end %>

Man, this makes me remember why I dislike erb. If you were doing this in HAML, it would be pretty, like unicorns and rainbows:
- @stories.each do |story|
  .story-container{id: "story-id-#{story.id}"}
    .story-name
      = story.name
    .story-invite-container
      = form_for :invite, story_invites_path(story) do |f2|
        = f2.hidden_field :invite, :user_id, value: @user.id
        = f2.submit 'Send', class: 'btn btn-primary'

Don't you like unicorns and rainbows? Look at all those beautiful divs with ids and classes just waiting to be dressed up with your butt-kicking, mad-ninja-skills CSS (display: inline-block, anyone?). (Please tell me you're using SASS. Please?)
Now, on submit, your params are going to look something like (I'm making up the story_id and 'user_id` values):
{..., story_id: 4, invite: {user_id: 1}, ...}

I assume in invites_controller, you have something like: 
class InvitesController < ActionController::Base

  def index
    ...
    @stories = Story.all
    ...
  end

  def create

    @story = Story.find_by(id: params[:story_id])
    @invite = @story.invites.new(invite_params)

    if @invite.save
      flash[:success] = 'The user was invited!'
      redirect_to(:back)
    else
      render :new
    end

  end

  def invite_params
    params.require(:invite).permit(:user_id)
  end

end

And that all ought to hang together.
For the life of me, I don't know why you redirect_to :new, but hey whatever floats your boat. (Are sure you don't want to redirect_to stories_path or maybe redirect_to story_path?)

