ルートを名前空間に設定したので、次のようになります。
root to: "home#index"
namespace :users do
root to: "profile#index"
resources :registrations
resources :sessions
end
namespace :admin do
root to: "base#index"
end
rake routes |grep root
root / home#index
admin_root /admin(.:format) admin/base#index
users_root /users(.:format) users/profile#index
私のヘッダーナビゲーションでは、= link_to "home", root_path
すべてが開発モードではうまく機能しますが、本番環境では完全に壊れています
No route matches {:controller=>"users/home"}
セッション/登録コントローラー(ユーザー/セッション/新規)にアクセスしようとすると取得します
ヘッダーのroot_pathは、名前空間home
でコントローラーを取得しようとしますusers
前もって感謝します