Nanoc 网站经过 Unicorn 测试
我有一个 nanoc 网站(因此,所有静态页面),我想用 unicorn 进行测试。 这背后的想法是在 Heroku 上托管这个网站。 该结构就是一个机架应用程序。 我添加了一个 config.ru 文件,如下所示:(
require 'rubygems'
require 'rack'
require 'rack-rewrite'
require 'rack/contrib'
use Rack::Rewrite do
rewrite '/','/output/index.html'
end
use Rack::Static, :urls => ['/'], :root => "output"
我的所有静态资源都位于输出目录中)
当我运行 unicorn 时,我收到以下错误消息:
NoMethodError at /output/index.html
undefined method `to_i' for #<Rack::Static:0x10165ee18>
我不太明白我在这里缺少什么:(
有什么想法吗?
谢谢,问候,
吕克
I have a nanoc site (so, all static pages) that I'd like to test with unicorn.
The idea behind this is to host this site on heroku then.
The structure is then a rack application.
I have added a config.ru file like:
require 'rubygems'
require 'rack'
require 'rack-rewrite'
require 'rack/contrib'
use Rack::Rewrite do
rewrite '/','/output/index.html'
end
use Rack::Static, :urls => ['/'], :root => "output"
(all my static resources are located in the output directory)
When I run unicorn I got the following error message:
NoMethodError at /output/index.html
undefined method `to_i' for #<Rack::Static:0x10165ee18>
I do not really understand what I am missing here :(
Any idea ?
Thanks and regards,
Luc
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有了这个 config.ru,它就可以工作了:)
问候,
吕克
with this config.ru, it works :)
Regards,
Luc