Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Heroku 使用Rake gem设置静态站点。如何添加新的Relic';你的yml文件正确吗?_Heroku_Rack_Newrelic - Fatal编程技术网

Heroku 使用Rake gem设置静态站点。如何添加新的Relic';你的yml文件正确吗?

Heroku 使用Rake gem设置静态站点。如何添加新的Relic';你的yml文件正确吗?,heroku,rack,newrelic,Heroku,Rack,Newrelic,我目前有一个静态网站,通过Rack应用程序部署到Heroku。以下是我的机架文件的外观: use Rack::Static, :urls => ["/images", "/javascript", "/css", "/favicon.ico"], :root => "public" run lambda { |env| [ 200, { 'Content-Type' => 'text/html', 'Cache-Contr

我目前有一个静态网站,通过Rack应用程序部署到Heroku。以下是我的机架文件的外观:

use Rack::Static,
  :urls => ["/images", "/javascript", "/css", "/favicon.ico"],
  :root => "public"

run lambda { |env|
  [
    200,
    {
      'Content-Type'  => 'text/html',
      'Cache-Control' => 'public, max-age=86400'
    },
    File.open('public/index.html', File::RDONLY)
  ]
}

我从NewRelic的站点下载了一个配置文件,但现在我需要实现NewRelic。有人知道我需要从yml文件更改机架文件中的哪些内容吗?

您可以尝试将yml文件包含在项目的根路径中

New Relic目前还不能处理静态应用程序