Heroku - 页面不存在 [英] Heroku - Page Doesn't Exist

查看:173
本文介绍了Heroku - 页面不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试访问我的应用程序时出现我的页面不存在的错误。它在本地工作,但不是在系统上,我运行耙路和重新启动,没有解决。虽然页面不存在显示我的自定义图标。这是一个简单的一页应用程序,用于我的个人公司我拥有,非常基本,没有任何超过顶部,一套脚手架,这就是它....在RubyMine开发



路径文件:

  BoothLeads :: Application.routes.draw do 

资源:导致


#优先级基于创建顺序:
#第一次创建 - >最高优先级。

#常规路线示例:
#match'products /:id'=> 'catalog#view'
#请记住,您可以指定以下值:controller和:action

#命名路由示例:
#match'products /:id /购买'=> 'catalog#purchase',:as => :购买
#可以通过purchase_url(:id => product.id)

来调用此路由(示例资源路由(将HTTP动词自动映射到控制器操作):
#resources:products

#带有选项的资源路径示例:
#resources:products do
#member do
#get'short'
#post 'toggle'
#end

#collection do
#get'sold'
#end
#end

#带有子资源的资源路径示例:
#resources:产品
#resources:comments,:sales
#resource:卖家
#结束

#使用更复杂的子资源的资源路径示例
#resources:产品do
#resources:comments
#resources:sales do
#get'recent',:on = > :collection
#end
#end

#命名空间中的资源路由示例:
#命名空间:admin do
##Directs / admin / products / *到Admin :: ProductsController
##(app / controllers / admin / products_controller.rb)
#resources:产品
#结束

#您可以拥有您的网站的根目录以root
#路由,只记得删除public / index.html。
#root:to => 'leads#index.html'

#查看所有路由如何使用rake routes布局

#这是一个传统的野生控制器路由,不推荐用于RESTful应用。
#注意:此路由将通过GET请求访问每个控制器中的所有操作。
#match':controller(/:action(/:id))(.: format)'
end

迁移

  class CreateLeads< ActiveRecord :: Migration 
def change
create_table:leads do | t |
t.string:name
t.string:address
t.string:phone
t.text:interest

t.timestamps
结束
结束
结束

LEADS控制器

 类LeadsController< ApplicationController 
#GET / leads
#GET /leads.json
def index
@leads = Lead.all

respond_to do | format |
format.html#index.html.erb
format.json {render json:@leads}
end
end

#GET / leads / 1
#GET /leads/1.json
def show
@lead = Lead.find(params [:id])

respond_to do | format |
format.html#show.html.erb
format.json {render json:@lead}
end
end

#GET / leads / new
#GET /leads/new.json
def new
@lead = Lead.new

respond_to do | format |
format.html#new.html.erb
format.json {render json:@lead}
end
end

#GET / leads / 1 /编辑
def编辑
@lead = Lead.find(params [:id])
结束

#POST / leads
#POST / leads.json
def创建
@lead = Lead.new(params [:lead])

respond_to do | format |
if @ lead.save
format.html {redirect_to @lead,注意:'Lead was successfully created。'}
format.json {render json:@lead,status::created,位置:@lead}
else
format.html {render action:new}
format.json {render json:@ lead.errors,status::unprocessable_entity}
end
end
end

#PUT / leads / 1
#PUT /leads/1.json
def update
@lead = Lead.find(params [:id])

respond_to do | format |
if @ lead.update_attributes(params [:lead])
format.html {redirect_to @lead,notice:'Lead was successfully updated。'}
format.json {head:no_content}
else
format.html {render action:edit}
format.json {render json:@ lead.errors,status::unprocessable_entity}
end
end
end

#DELETE / leads / 1
#DELETE /leads/1.json
def destroy
@lead = Lead.find(params [:id])
@ lead.destroy

respond_to do | format |
format.html {redirect_to leads_url}
format.json {head:no_content}
end
end
end

其他任何需要的信息都会通知我。



感谢您的帮助。
$ b

CMD PROMPT:Heroku日志

  C:\ Users \Jeff Gray\RubymineProjects \ BoothLeads> heroku日志
2013-04-01T05:34:12 + 00:00 app [web.1]:在218ms内完成200行(查看:61.9ms |
ActiveRecord:63.6ms)
2013-04-01T05:34:13 + 00:00 heroku [router]:at = info method = GET path = / assets / applic
ation-01780e1cf08fc467414520399232647f.css host = peaceful-chamber-6371 .herokuapp。
com fwd =110.32.193.201dyno = web.1 connect = 1ms service = 32ms status = 200 bytes = 25
4629
2013-04-01T05:34:13 + 00: 00 heroku [router]:at = info method = GET path = / assets / application
ation-5909661ad10a83c2e0ae36fac77e7706.js host = peaceful-chamber-6371.herokuapp.c
om fwd =110.32.193.201 dyno = web.1 connect = 1ms service = 19ms status = 200 bytes = 128
395
2013-04-01T05:34:21 + 00:00 heroku [web.1]:停止所有进程SIGTERM
2013-04-01T05:34:22 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/server
.rb:90: 'select'
2013-04-01T05:34:22 + 00:00 app [web.1]:[2013-04-01 05:34:22] ERROR SignalExceptio
n:SIGTERM
2013-04-01T05:34:33 + 00:00 heroku [web.1]:用SIGKI
LL
停止剩下的进程2013-04-01T05:34:33 + 00:00 heroku [web.1]:错误R12(退出超时) - >至少在
e过程中失败,在SIGTERM
2013-04-01T05:34:35 + 00:00的10秒内退出heroku [web.1]:进程已退出,状态为137
2013 -04-01T05:37:42 + 00:00 heroku [api]:用命令`bundle exe
c rake db:migrate`启动进程jeff.slim.gray@gmail.com
2013-04 -01T05:37:45 + 00:00 heroku [run.2185]:等待客户
2013-04-01T05:37:45 + 00:00 heroku [run.2185]:用命令`bundl $启动进程b $ be exec rake db:migrate`
2013-04-01T05:37:46 + 00:00 heroku [run.2185]:状态从开始改为
2013-04-01T05:37 :54 + 00:00 heroku [run.2185]:进程退出状态1
2013-04-01T05:37:54 + 00:00 heroku [run.2185]:状态从最高改为
2013-04-01T05:38:00 + 00:00 heroku [web.1]:状态从最初变为
2013-04-01T05:38:02 + 00:00 heroku [web.1 ]:使用命令`bundle e
启动进程xec rails server -p 47627`
2013-04-01T05:38:03 + 00:00 heroku [web.1]:使用SIGTERM $停止所有进程b $ b 2013- 04-01T05:38:04 + 00:00 app [web.1]:[2013-04-01 05:38:04] ERROR SignalExceptio
n:SIGTERM
2013-04-01T05:38: 04 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/server
.rb:90:在`select'
2013-04-01T05 :38:06 + 00:00 app [web.1]:DEPRECATION警告:您在供应商/插件中拥有Rails 2.3-st
yle插件!这些插件的支持将在Rail
s 4.0中删除。将它们移出并将它们捆绑到您的Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的ap
p中。请参阅发行说明f
或以上:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been
- 发行。 (从/app/config/environment.rb:5上的< top(required)>调用)
2013-04-01T05:38:06 + 00:00 app [web.1]:DEPRECATION WARNING:你有供应商/插件的Rails 2.3-st
yle插件!这些插件的支持将在Rail
s 4.0中删除。将它们移出并将它们捆绑到您的Gemfile中,或者将它们作为lib / myplugin / *和config / initializers / myplugin.rb折叠到您的ap
p中。请参阅发行说明f
或以上:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been
- 发行。 (在/app/config/environment.rb:5)从< top(required)>调用)
2013-04-01T05:38:10 + 00:00 app [web.1]:=>启动WEBrick
2013-04-01T05:38:10 + 00:00 app [web.1]:=> Rails 3.2.12应用程序在http://0.0.0.0:47627
2013-04-01T05:38:10 + 00:00 app [web.1]:=>上的pr
oduction中启动。用-d呼叫以分离
2013-04-01T05:38:10 + 00:00 app [web.1]:=> Ctrl-C关闭服务器
2013-04-01T05:38:10 + 00:00应用[web.1]:连接到由DATABA指定的数据库
SE_URL
2013-04-01T05 :38:10 + 00:00 app [web.1]:[2013-04-01 05:38:10] INFO ruby​​ 1.9.2(20
11-07-09)[x86_64-linux]
2013-04-01T05:38:10 + 00:00 app [web.1]:[2013-04-01 05:38:10]信息WEBrick 1.3.1
2013-04-01T05: 38:10 + 00:00 app [web.1]:[2013-04-01 05:38:10]信息WEBrick :: HTTPS
erver#start:pid = 2 port = 47627
2013 -04-01T05:38:11 + 00:00 heroku [web.1]:状态从开始更改为
2013-04-01T05:38:14 + 00:00 heroku [web.1]:错误R12(退出超时) - >至少
e SIGTERM
2013-04-01T05:38:14 + 00:00 heroku [web.1]:用SIGKI
停止剩余的进程
2013-04-01T05:38:17 + 00:00 heroku [web.1]:进程退出状态137
2013-04-01T05:38:36 + 00:00 heroku [router] :at = info method = GET path = / host = peacefu
l-chamber-6371.herokuapp.com fwd =75.170.18.86dyno = web.1 connect = 6ms service = 1
94ms status = 404字节= 728
2013-04-01T05:38:36 + 00:00 app [web.1]:在2013-0
4-01 05开始GET/为75.170.18.86 :38:35 +0000
2013-04-01T05:38:36 + 00:00 app [web.1]:
2013-04-01T05:38:36 + 00:00 app [web .1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
.2.12 / lib / rails / rack / logger.rb:32:在`call_app'
2013-04- 01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / activesupp
ort-3.2.12 / lib / active_support / tagged_logging.rb:22:in `tagged'
2013-04-01T05:38:36 + 00:00 app [web.1]:ActionController :: RoutingError(无路由m
atches [GET] /):
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
.2.12 /lib/rails/rack/logger.rb:16:in`call'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / actionpack
-3.2.12 / lib / action_dispatch / middleware / request_id.rb:22:在`call'
2013-04-01T05:38:36 + 00:00 app [web。 1]:vendor / bundle / ruby​​ / 1.9.1 / gems / activesupp
ort-3.2.12 / lib / active_support / cache / strategy / local_cache.rb:72:in`call'
2013- 04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / actionpack
-3.2.12 / lib / action_dispatch / middleware / show_exceptions.rb: 56:在`call'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
。 2.12 / lib / rails / rack / logger.rb:16:在`block in call'中
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-1.4.5
/lib/rack/methodoverride.rb:21:in`call'
2013-04-01T05:38:36 + 00:00 app [web .1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-1.4.5
/lib/rack/lock.rb:15:in`call'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / actionpack
-3.2.12 / lib / action_dispatch / middleware / debug_exceptions.rb:21:在`call'
2013-04-01T05:38:36 + 00:00 app [web。 1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb:136:在'forward'
2013-04-01T05 :38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb:245:i
n`fetch'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb:66:in`call!'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
.2.12 / lib / rails / engine.rb:479:在`call'
2013-04-01T05:38:36 + 00:00 app [web .1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb:51:在`call'
2013-04- 01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
.2.12 / lib / rail s / application.rb:223:在`call'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack- 1.4.5
/lib/rack/content_length.rb:14:in`call'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby / 1.9.1 / gems / rack-1.4.5
/lib/rack/runtime.rb:17:in`call'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb:185:在`lookup'中
2013- 04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / actionpack
-3.2.12 / lib / action_dispatch / middleware / static.rb: 62:在`call'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
。 2.12 / lib / rails / rack / log_tailer.rb:17:在`call'
2013-04-01T05:38:36 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9。 1 / gems / rack-1.4.5
/lib/rack/handler/webrick.rb:59:in`service'
2013-04-01T05:38:36 + 00:00 app [web .1]:/usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:在'service'
2013-04-0 1T05:38:36 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:在'run'中
2013-04-01T05:38:36 + 00:00 app [web.1]:
2013-04-01T05:38:36 + 00:00 app [web.1]:/ usr / local / lib /ruby/1.9.1/webrick/server
.rb:183:在`block in start_thread'
2013-04-01T05:38:36 + 00:00 app [web.1]:
2013-04-01T05:39:44 + 00:00 app [web.1]:在2013-0
4-01 05:39:44 +0000开始GET/为75.170.18.86
2013-04-01T05:39:44 + 00:00 app [web.1]:
2013-04-01T05:39:44 + 00:00 app [web.1]:ActionController: :RoutingError(无路由m
atches [GET]/):
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9 .1 / gems / actionpack
-3.2.12 / lib / action_dispatch / middleware / debug_exceptions.rb:21:在`call'
2013-04-01T05:39:44 + 00:00 app [ web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / actionpack
-3.2.12 / lib / action_dispatch / middleware / show_exceptions.rb:56:in`call'
2013-04 -01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
.2。 12 / lib / rails / rack / logger.rb:32:在`call_app'
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9。 1 / gems / railties-3
.2.12 / lib / rails / rack / logger.rb:16:在`block in call'中
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / activesupp
ort-3.2.12 / lib / active_support / tagged_logging.rb:22:在`tagged'
2013-04 -01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
.2.12 / lib / rails / rack / logger.rb:16 :in`call'
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / actionpack
-3.2.12 /lib/action_dispatch/middleware/request_id.rb:22:in`call'
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 /gems/rack-1.4.5
/lib/rack/methodoverride.rb:21:in`call'
2013-04-01T05:39:44 + 00:00 app [web.1] :vendor / bundle / ruby​​ / 1.9.1 / gems / rack-1.4.5
/lib/rack/runtime.rb:17:in`call'
2013-04-01T05:39:44 +00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / activesupp
ort -3.2.12 / lib / active_support / cache / strategy / local_cache.rb:72:在`call'
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle /ruby/1.9.1/gems/rack-1.4.5
/lib/rack/lock.rb:15:in`call'
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / actionpack
-3.2.12 / lib / action_dispatch / middleware / static.rb:62:in`call'
2013 -04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb :136:'forward'
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb:245:在`fetch'
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9 .1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb:185:在`lookup'
2013-04-01T05:39:44 + 00:00 app [ web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
-1.2 / lib / rack / cache / context.rb:51:在`call'
2013-04 -01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-cache
- 1.2 / lib / rack / cache / context.rb:66:在`call!'
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9 .1 / gems / railties-3
.2.12 / lib / rails / engine.rb:479:在`call'
2013-04-01T05:39:44 + 00:00 app [web。 1]:vendor / bundle / ruby​​ / 1.9.1 / gems / railties-3
.2.12 / lib / rails / application.rb:223:in`call'
2013-04-01T05:39 :44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-1.4.5
/lib/rack/content_length.rb:14:in`call'
2013-04-01T05:39:44 + 00:00 heroku [router]:at = info method = GET path = / host = peacefu
l-chamber-6371.herokuapp.com fwd =75.170 .18.86dyno = web.1 connect = 2ms service = 4
6ms status = 404 bytes = 728
2013-04-01T05:39:44 + 00:00 app [web.1]:vendor /bundle/ruby/1.9.1/gems/railties-3
.2.12 / lib / rails / rack / log_tailer.rb:17:在`call'
2013-04-01T05:39:44 +00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:在'service'
2013-04-01T05 :39:44 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:在`block in start_thread'
2013-04-01T05:39:44 + 00:00 app [web.1]:/usr/local/lib/ruby/1.9.1/ webrick / httpse
rver.rb:70:'run'
2013-04-01T05:39:44 + 00:00 app [web.1]:
2013-04-01T05 :39:44 + 00:00 app [web.1]:vendor / bundle / ruby​​ / 1.9.1 / gems / rack-1.4.5
/lib/rack/handler/webrick.rb:59:in 'service'
2013-04-01T05:39:44 + 00:00 app [web.1]:
2013-04-01T05:39:54 + 00:00 app [web.1] :开始在
获得110.32.193.201 GET/ lead2013-04-01 05:39:54 +0000
2013-04-01T05:39:54 + 00:00 app [web.1 ]:通过LeadsController#index处理为HTM
L
2013-04-01T05:39:54 + 00:00 app [web.1]:渲染线索/ index.html.erb在lay $ b内$ b outs / application(12.6ms)
2013-04-01T05:39:54 + 00:00 app [web.1]:在207ms内完成200行(查看:60.8ms |
ActiveRecord:60.4ms)
2013-04-01T05:39:54 + 00:00 heroku [router]:at = info method = GET path = / leads host = pe
aceful- chamber-6371.herokuapp.com fwd =110.32.193.201dyno = web.1 connect = 1ms se
rvice = 228ms status = 304 bytes = 0

Production.rb

  BoothLeads :: Application.configure do 
#此处指定的设置将优先于config / application.rb中的设置

#代码不会在请求之间重新加载$ ​​b $ b config.cache_classes = true

#完全错误报告被禁用并且缓存已打开
config.consider_all_requests_local = false
config.action_controller.perform_caching = true

#禁用Rails的静态资产服务器(Apache或nginx将会已经这样做了)
config.serve_static_assets = false

#压缩JavaScript和CSS
config.assets.compress = true

#不要后备资产管道,如果预编译的组合t被忽略
config.assets.compile = true


#为资产URL生成摘要
config.assets.digest = true

#默认为nil并保存在由config.assets.prefix指定的位置
#config.assets.manifest = YOUR_PATH

#指定服务器用于发送文件的标头
#config.action_dispatch.x_sendfile_header =X-Sendfile#为apache
#config.action_dispatch.x_sendfile_header ='X-Accel-Redirect'#for nginx

#强制所有访问通过SSL的应用程序,使用Strict-Transport-Security,并使用安全cookie。
#config.force_ssl = true

#查看日志中的所有内容(默认为:info)
#config.log_level =:debug

#使用以下标记预先安排所有日志行
#config.log_tags = [:subdomain,:uuid]

#为分布式设置使用不同的记录器
#config.logger = ActiveSupport :: TaggedLogging.new(SyslogLogger.new)

#在产品中使用不同的缓存存储
#config.cache_store =:mem_cache_store

#启用图像服务,样式表和来自资产服务器的JavaScript
#config.action_controller.asset_host =http://assets.example.com

#预编译附加资产(application.js,application。 css,并且所有非JS / CSS都已添加)
#config.assets.precompile + =%w(search.js)

#禁用传递错误,错误的电子邮件地址将会忽略
#config.action_mailer.raise_delivery_errors = false

#启用线程模式
#confi g.threadsafe!

#启用I18n的语言环境回退(查找任何语言环境回落到
#无法找到翻译时的I18n.default_locale)
config.i18n.fallbacks = true

#将弃用声明发送给已注册的侦听器
config.active_support.deprecation =:notify

#将查询计划记录为超过此值(工程
#with SQLite,MySQL和PostgreSQL)
#config.active_record.auto_explain_threshold_in_seconds = 0.5
end

Development.rb

  BoothLeads :: Application.configure do 
#此处指定的设置将优先于config / application.rb中的那些

#在开发环境中,您的应用程序代码将重新加载到
#的每个请求中。这会减慢响应时间,但对于开发
#来说是完美的,因为当您更改代码时不必重新启动Web服务器。
config.cache_classes = false

#当您意外地调用nil方法时记录错误消息。
config.whiny_nils = true

#显示完整的错误报告并禁用缓存
config.consider_all_requests_local = true
config.action_controller.perform_caching = false

#不关心邮件程序是否无法发送
config.action_mailer.raise_delivery_errors = false

#将弃用通知打印到Rails记录器
config.active_support。 deprecation =:log

#仅使用内置于浏览器中的最佳标准支持
config.action_dispatch.best_standards_support =:内置

#引发质量分配保护异常对于Active Record模型
config.active_record.mass_assignment_sanitizer =:strict

#将查询的查询计划记录为超过此值(使用SQLite,MySQL和PostgreSQL工作
#)
config.active_record.auto_explain_threshold_in_seconds = 0.5

#不压缩资产
config.assets.compress = false

#扩展行s加载资产
config.assets.debug = true
end

Cat / Config / Routes.rb

  C:\ Users \Jeff Gray\RubymineProjects\BoothLeads> heroku run cat config / routes.rb 
运行连接到终端的`cat config / routes.rb` ... up,run.2943
BoothLeads :: Application.routes.draw做
资源:solds


资源:潜在客户


#优先权基于创建顺序:
#第一次创建 - >最高优先级。

#常规路线示例:
#match'products /:id'=> 'catalog#view'
#请记住,您可以指定以下值:controller和:action

#命名路由示例:
#match'products /:id /购买'=> 'catalog#purchase',:as => :购买
#可以通过purchase_url(:id => product.id)

来调用此路由(示例资源路由(将HTTP动词自动映射到控制器操作):

#资源:产品

#带有选项的资源路径示例:
#resources:products do
#member do
#get'short'
#post'toggle'
#end

#collection do
#get'sold'
#end
#end

#使用子资源的资源路径示例:
#resources:产品
#resources:comments,:sales
#resource:seller
#end

#带有更复杂子资源的资源路径示例
#resources:产品do b $ b#resources:comments
#resources:sales do
#get'recent' ,:on => :collection
#end
#end

#命名空间中的资源路由示例:
#命名空间:admin do
##Directs / admin / products / *到Admin :: ProductsController
##(app / controllers / admin / products_controller.rb)
#resources:产品
#结束

#您可以拥有您的网站的根目录以root
#路由,只记得删除public / index.html。
#root:to => 'welcome#index'

#查看你的所有路由如何使用rake routes布局

#这是一个传统的wild控制器路由,不建议用于RESTful ap
plications。
#注意:此路由将通过GE
T请求访问每个控制器中的所有操作。
#match':controller(/:action(/:id))(.: format)'
end


解决方案

您的网页实际上即将推出(尝试 http://peaceful-chamber-6371.herokuapp.com/leads ),这只是没有为根目录定义的路由( http://peaceful-chamber-6371.herokuapp.com/ )。



既然你打算这是一个单页面的网站,我会移动到根:

  BoothLeads :: Application。 routes.draw do 
资源:线索,路径:''
结束

这将使您的潜在客户可以在localhost:3000本地访问,也可以在 http:// peaceful-chamber-6371。 herookuapp.com/ 在Heroku上。


Getting an error that my page doesn't exist when trying to reach my application. It works locally, but not on the system, i have run rake and routes and restart, with no resolve. The "Page Doesn't" Exist does show my custom favicon though. THIS IS A SIMPLE ONE PAGE APP FOR USE WITHIN MY PERSONAL COMPANY I OWN, VERY BASIC, nothing over the top, one set of scaffolds and thats it.... Was developed in RubyMine

Routes File:

BoothLeads::Application.routes.draw do

  resources :leads


  # The priority is based upon order of creation:
  # first created -> highest priority.

  # Sample of regular route:
  #   match 'products/:id' => 'catalog#view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Sample resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Sample resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Sample resource route with more complex sub-resources
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', :on => :collection
  #     end
  #   end

  # Sample resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end

  # You can have the root of your site routed with "root"
  # just remember to delete public/index.html.
   #root :to => 'leads#index.html'

  # See how all your routes lay out with "rake routes"

  # This is a legacy wild controller route that's not recommended for RESTful applications.
  # Note: This route will make all actions in every controller accessible via GET requests.
  # match ':controller(/:action(/:id))(.:format)'
end

Migrate

class CreateLeads < ActiveRecord::Migration
  def change
    create_table :leads do |t|
      t.string :name
      t.string :address
      t.string :phone
      t.text :interest

      t.timestamps
    end
  end
end

LEADS CONTROLLER

class LeadsController < ApplicationController
  # GET /leads
  # GET /leads.json
  def index
    @leads = Lead.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @leads }
    end
  end

  # GET /leads/1
  # GET /leads/1.json
  def show
    @lead = Lead.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @lead }
    end
  end

  # GET /leads/new
  # GET /leads/new.json
  def new
    @lead = Lead.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @lead }
    end
  end

  # GET /leads/1/edit
  def edit
    @lead = Lead.find(params[:id])
  end

  # POST /leads
  # POST /leads.json
  def create
    @lead = Lead.new(params[:lead])

    respond_to do |format|
      if @lead.save
        format.html { redirect_to @lead, notice: 'Lead was successfully created.' }
        format.json { render json: @lead, status: :created, location: @lead }
      else
        format.html { render action: "new" }
        format.json { render json: @lead.errors, status: :unprocessable_entity }
      end
    end
  end

  # PUT /leads/1
  # PUT /leads/1.json
  def update
    @lead = Lead.find(params[:id])

    respond_to do |format|
      if @lead.update_attributes(params[:lead])
        format.html { redirect_to @lead, notice: 'Lead was successfully updated.' }
        format.json { head :no_content }
      else
        format.html { render action: "edit" }
        format.json { render json: @lead.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /leads/1
  # DELETE /leads/1.json
  def destroy
    @lead = Lead.find(params[:id])
    @lead.destroy

    respond_to do |format|
      format.html { redirect_to leads_url }
      format.json { head :no_content }
    end
  end
end

Anything else needed let me know.

Thanks for the help.

CMD PROMPT: Heroku Logs

C:\Users\Jeff Gray\RubymineProjects\BoothLeads>heroku logs
2013-04-01T05:34:12+00:00 app[web.1]: Completed 200 OK in 218ms (Views: 61.9ms |
 ActiveRecord: 63.6ms)
2013-04-01T05:34:13+00:00 heroku[router]: at=info method=GET path=/assets/applic
ation-01780e1cf08fc467414520399232647f.css host=peaceful-chamber-6371.herokuapp.
com fwd="110.32.193.201" dyno=web.1 connect=1ms service=32ms status=200 bytes=25
4629
2013-04-01T05:34:13+00:00 heroku[router]: at=info method=GET path=/assets/applic
ation-5909661ad10a83c2e0ae36fac77e7706.js host=peaceful-chamber-6371.herokuapp.c
om fwd="110.32.193.201" dyno=web.1 connect=1ms service=19ms status=200 bytes=128
395
2013-04-01T05:34:21+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-04-01T05:34:22+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:90:in `select'
2013-04-01T05:34:22+00:00 app[web.1]: [2013-04-01 05:34:22] ERROR SignalExceptio
n: SIGTERM
2013-04-01T05:34:33+00:00 heroku[web.1]: Stopping remaining processes with SIGKI
LL
2013-04-01T05:34:33+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least on
e process failed to exit within 10 seconds of SIGTERM
2013-04-01T05:34:35+00:00 heroku[web.1]: Process exited with status 137
2013-04-01T05:37:42+00:00 heroku[api]: Starting process with command `bundle exe
c rake db:migrate` by jeff.slim.gray@gmail.com
2013-04-01T05:37:45+00:00 heroku[run.2185]: Awaiting client
2013-04-01T05:37:45+00:00 heroku[run.2185]: Starting process with command `bundl
e exec rake db:migrate`
2013-04-01T05:37:46+00:00 heroku[run.2185]: State changed from starting to up
2013-04-01T05:37:54+00:00 heroku[run.2185]: Process exited with status 1
2013-04-01T05:37:54+00:00 heroku[run.2185]: State changed from up to complete
2013-04-01T05:38:00+00:00 heroku[web.1]: State changed from up to starting
2013-04-01T05:38:02+00:00 heroku[web.1]: Starting process with command `bundle e
xec rails server -p 47627`
2013-04-01T05:38:03+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-04-01T05:38:04+00:00 app[web.1]: [2013-04-01 05:38:04] ERROR SignalExceptio
n: SIGTERM
2013-04-01T05:38:04+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:90:in `select'
2013-04-01T05:38:06+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been
-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T05:38:06+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been
-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T05:38:10+00:00 app[web.1]: => Booting WEBrick
2013-04-01T05:38:10+00:00 app[web.1]: => Rails 3.2.12 application starting in pr
oduction on http://0.0.0.0:47627
2013-04-01T05:38:10+00:00 app[web.1]: => Call with -d to detach
2013-04-01T05:38:10+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-04-01T05:38:10+00:00 app[web.1]: Connecting to database specified by DATABA
SE_URL
2013-04-01T05:38:10+00:00 app[web.1]: [2013-04-01 05:38:10] INFO  ruby 1.9.2 (20
11-07-09) [x86_64-linux]
2013-04-01T05:38:10+00:00 app[web.1]: [2013-04-01 05:38:10] INFO  WEBrick 1.3.1
2013-04-01T05:38:10+00:00 app[web.1]: [2013-04-01 05:38:10] INFO  WEBrick::HTTPS
erver#start: pid=2 port=47627
2013-04-01T05:38:11+00:00 heroku[web.1]: State changed from starting to up
2013-04-01T05:38:14+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least on
e process failed to exit within 10 seconds of SIGTERM
2013-04-01T05:38:14+00:00 heroku[web.1]: Stopping remaining processes with SIGKI
LL
2013-04-01T05:38:17+00:00 heroku[web.1]: Process exited with status 137
2013-04-01T05:38:36+00:00 heroku[router]: at=info method=GET path=/ host=peacefu
l-chamber-6371.herokuapp.com fwd="75.170.18.86" dyno=web.1 connect=6ms service=1
94ms status=404 bytes=728
2013-04-01T05:38:36+00:00 app[web.1]: Started GET "/" for 75.170.18.86 at 2013-0
4-01 05:38:35 +0000
2013-04-01T05:38:36+00:00 app[web.1]:
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:32:in `call_app'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged'
2013-04-01T05:38:36+00:00 app[web.1]: ActionController::RoutingError (No route m
atches [GET] "/"):
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:16:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:16:in `block in call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/methodoverride.rb:21:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/lock.rb:15:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:i
n `fetch'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/engine.rb:479:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/application.rb:223:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/content_length.rb:14:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/runtime.rb:17:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/log_tailer.rb:17:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/handler/webrick.rb:59:in `service'
2013-04-01T05:38:36+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2013-04-01T05:38:36+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2013-04-01T05:38:36+00:00 app[web.1]:
2013-04-01T05:38:36+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2013-04-01T05:38:36+00:00 app[web.1]:
2013-04-01T05:39:44+00:00 app[web.1]: Started GET "/" for 75.170.18.86 at 2013-0
4-01 05:39:44 +0000
2013-04-01T05:39:44+00:00 app[web.1]:
2013-04-01T05:39:44+00:00 app[web.1]: ActionController::RoutingError (No route m
atches [GET] "/"):
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:32:in `call_app'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:16:in `block in call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:16:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/methodoverride.rb:21:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/runtime.rb:17:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/lock.rb:15:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:in `fetch'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/engine.rb:479:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/application.rb:223:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/content_length.rb:14:in `call'
2013-04-01T05:39:44+00:00 heroku[router]: at=info method=GET path=/ host=peacefu
l-chamber-6371.herokuapp.com fwd="75.170.18.86" dyno=web.1 connect=2ms service=4
6ms status=404 bytes=728
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/log_tailer.rb:17:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2013-04-01T05:39:44+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2013-04-01T05:39:44+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2013-04-01T05:39:44+00:00 app[web.1]:
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/handler/webrick.rb:59:in `service'
2013-04-01T05:39:44+00:00 app[web.1]:
2013-04-01T05:39:54+00:00 app[web.1]: Started GET "/leads" for 110.32.193.201 at
 2013-04-01 05:39:54 +0000
2013-04-01T05:39:54+00:00 app[web.1]: Processing by LeadsController#index as HTM
L
2013-04-01T05:39:54+00:00 app[web.1]:   Rendered leads/index.html.erb within lay
outs/application (12.6ms)
2013-04-01T05:39:54+00:00 app[web.1]: Completed 200 OK in 207ms (Views: 60.8ms |
 ActiveRecord: 60.4ms)
2013-04-01T05:39:54+00:00 heroku[router]: at=info method=GET path=/leads host=pe
aceful-chamber-6371.herokuapp.com fwd="110.32.193.201" dyno=web.1 connect=1ms se
rvice=228ms status=304 bytes=0

Production.rb

    BoothLeads::Application.configure do
  # Settings specified here will take precedence over those in config/application.rb

  # Code is not reloaded between requests
  config.cache_classes = true

  # Full error reports are disabled and caching is turned on
  config.consider_all_requests_local       = false
  config.action_controller.perform_caching = true

  # Disable Rails's static asset server (Apache or nginx will already do this)
  config.serve_static_assets = false

  # Compress JavaScripts and CSS
  config.assets.compress = true

  # Don't fallback to assets pipeline if a precompiled asset is missed
  config.assets.compile = true


  # Generate digests for assets URLs
  config.assets.digest = true

  # Defaults to nil and saved in location specified by config.assets.prefix
  # config.assets.manifest = YOUR_PATH

  # Specifies the header that your server uses for sending files
  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx

  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
  # config.force_ssl = true

  # See everything in the log (default is :info)
  # config.log_level = :debug

  # Prepend all log lines with the following tags
  # config.log_tags = [ :subdomain, :uuid ]

  # Use a different logger for distributed setups
  # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)

  # Use a different cache store in production
  # config.cache_store = :mem_cache_store

  # Enable serving of images, stylesheets, and JavaScripts from an asset server
  # config.action_controller.asset_host = "http://assets.example.com"

  # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
  # config.assets.precompile += %w( search.js )

  # Disable delivery errors, bad email addresses will be ignored
  # config.action_mailer.raise_delivery_errors = false

  # Enable threaded mode
  # config.threadsafe!

  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
  # the I18n.default_locale when a translation can not be found)
  config.i18n.fallbacks = true

  # Send deprecation notices to registered listeners
  config.active_support.deprecation = :notify

  # Log the query plan for queries taking more than this (works
  # with SQLite, MySQL, and PostgreSQL)
  # config.active_record.auto_explain_threshold_in_seconds = 0.5
end

Development.rb

BoothLeads::Application.configure do
  # Settings specified here will take precedence over those in config/application.rb

  # In the development environment your application's code is reloaded on
  # every request. This slows down response time but is perfect for development
  # since you don't have to restart the web server when you make code changes.
  config.cache_classes = false

  # Log error messages when you accidentally call methods on nil.
  config.whiny_nils = true

  # Show full error reports and disable caching
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false

  # Don't care if the mailer can't send
  config.action_mailer.raise_delivery_errors = false

  # Print deprecation notices to the Rails logger
  config.active_support.deprecation = :log

  # Only use best-standards-support built into browsers
  config.action_dispatch.best_standards_support = :builtin

  # Raise exception on mass assignment protection for Active Record models
  config.active_record.mass_assignment_sanitizer = :strict

  # Log the query plan for queries taking more than this (works
  # with SQLite, MySQL, and PostgreSQL)
  config.active_record.auto_explain_threshold_in_seconds = 0.5

  # Do not compress assets
  config.assets.compress = false

  # Expands the lines which load the assets
  config.assets.debug = true
end

Cat/Config/Routes.rb

C:\Users\Jeff Gray\RubymineProjects\BoothLeads>heroku run cat config/routes.rb
Running `cat config/routes.rb` attached to terminal... up, run.2943
BoothLeads::Application.routes.draw do
  resources :solds


  resources :leads


  # The priority is based upon order of creation:
  # first created -> highest priority.

  # Sample of regular route:
  #   match 'products/:id' => 'catalog#view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):

  #   resources :products

  # Sample resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Sample resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Sample resource route with more complex sub-resources
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', :on => :collection
  #     end
  #   end

  # Sample resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end

  # You can have the root of your site routed with "root"
  # just remember to delete public/index.html.
  # root :to => 'welcome#index'

  # See how all your routes lay out with "rake routes"

  # This is a legacy wild controller route that's not recommended for RESTful ap
plications.
  # Note: This route will make all actions in every controller accessible via GE
T requests.
  # match ':controller(/:action(/:id))(.:format)'
end

解决方案

Your pages are actually coming up (try http://peaceful-chamber-6371.herokuapp.com/leads), it's just that there's no route defined for the root (http://peaceful-chamber-6371.herokuapp.com/).

Since you intend this to be a single-page site, I'd "move" leads up to the root:

BoothLeads::Application.routes.draw do
   resources :leads, path: ''
end

That will make your leads available at localhost:3000 locally, and at http://peaceful-chamber-6371.herokuapp.com/ on Heroku.

这篇关于Heroku - 页面不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆