部署 部署 heroku 后,出现 RoutingError

kevinunic · 2014年01月16日 · 最后由 pynix 回复于 2016年06月16日 · 2604 次阅读

部署 heroku 后,放问页面提示 The page you were looking for doesn't exist. 使用 heroku logs 查看,提示这个错误:ActionController::RoutingError (No route matches [GET] "/")。 在开发环境中,路由是正常的,用 heroku run rake routes 查看,竟然没有任何路由信息,一下就茫然了。 请懂的能给解决哈,谢谢!

你部署 helloworld?production 环境默认 welcome 页面没有了。。。。

我觉得你应该把 routs.rb 粘贴上来看看,不然问题很抽象

#1 楼 @pynix 我知道,是我自己的一个 welcome 页面

#2 楼 @jxs471494539

Blogdemo::Application.routes.draw do

  get "index_page/home"
  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
   root 'index_page#home'
end

#1 楼 @pynix 已经解决了,谢谢

#1 楼 @pynix 被这个坑了好久才发现……

需要 登录 后方可回复, 如果你还没有账号请 注册新账号