Deployment 部署heroku应用程序-内部服务器错误
我正在尝试将静态网页部署到Heroku,如下所示: 当我想在浏览器中查看我的页面时,会收到以下错误消息: Internal Server Error No such file or directory - public/index.html WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09) at dosasite2013.herokuapp.com:80 内部服务器错误 没有这样的文件或目录-public/index.html WEBrick/1.3.1(Ruby/1.9.2/2011-07-09)在dosasite2013.herokuapp.com:80 我的config.ru如下(基于官方教程) 使用Rack::Static, :URL=>[“/stylesheets”,“/images”], :root=>“public” 运行lambda{| env| [ 200, { '内容类型'=>'文本/html', “缓存控制”=>“公共,最大年龄=86400” }, File.open('public/index.html',File::RDONLY) ] } 当我通过rackup在内部运行应用程序时…public/index.html页面显示okDeployment 部署heroku应用程序-内部服务器错误,deployment,heroku,Deployment,Heroku,我正在尝试将静态网页部署到Heroku,如下所示: 当我想在浏览器中查看我的页面时,会收到以下错误消息: Internal Server Error No such file or directory - public/index.html WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09) at dosasite2013.herokuapp.com:80 内部服务器错误 没有这样的文件或目录-public/index.html WEBrick/1.3.1(Ruby/1
如何在Heroku查看我的页面?问题已经解决。在config.ru文件中,我将
public/index.html
更改为public/index.html
,与:root=>“public”相同。
原因是我的目录以大写字母p开头,而不是小字母“p”。是您推送的存储库中的文件吗?是的,我使用了git add。。。 use Rack::Static, :urls => ["/stylesheets", "/images"], :root => "public" run lambda { |env| [ 200, { 'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400' }, File.open('public/index.html',File::RDONLY) ] }