That is because you have post '/tweets' => 'tweets#create'
defined after other tweet
routes.
Modify your route config by moving this line above other tweet
routes:
# config/routes.rb
...
post '/tweets' => 'tweets#create'
resources :tweets, only: [ :index, :new ]
...