在我config/routes.rb
我有以下
Myapp::Application.routes.draw do
# We ask that you don't use the :as option here, as Refinery relies on it being the default of "refinery"
mount Refinery::Core::Engine, :at => '/'
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
root :to => 'refinery/blog/posts#index'
# See how all your routes lay out with "rake routes"
end
我在终端中运行了rake routes
。然后承诺并推动。然后运行heroku run rake routes
但是当我加载应用程序时,它仍然加载主页作为根目录。
答案 0 :(得分:2)
将您的路线放在Refinery的挂载点之前,因为Refinery有一个通配符路径,因此它可以处理404并且基本上是您的应用程序的支持。因此,一般来说,在每隔一条路线后安装炼油厂。