SPAを作りたいときなどRailsのルーティングが不要な場合があります。
Rails.application.routes.draw do
# たとえばAPI
constraints subdomain: /^api/ do
mount Api::Root => '/'
mount GrapeSwaggerRails::Engine => '/docs'
end
# それ以外はすべて
get '*path', to: 'home#otherwise'
end
で、app/views/home/otherwise.html.erb
にSPAを書けば良いです。