Replaced the root route with root ':to => 'home#index' as we use root_url and root_path in the code and need a named root route.