0

在我的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,但是当我加载应用程序时,它仍然加载主页作为根。

4

1 回答 1

2

将您的路由放在 Refinery 的挂载点之前,因为 Refinery 有一个通配符路由,因此它可以处理 404 并且基本上是您的应用程序的支持。所以,一般来说,每隔一条路线就安装炼油厂。

于 2013-09-04T23:19:05.227 回答