我添加了演示文件并在本地运行应用程序
但是当我部署到heroku时,我遇到了问题,内容没有显示出来
我通读了nesta官方网站上的文档
http://nestacms.com/docs/deployment/heroku
但他们几乎只是发表评论而不是提供指导
确保正确填写config / config.yml(最重要的是确保缓存已关闭,因为我们无法写入Heroku的文件系统)。
我在其他地方跟踪了他们的文档 http://nestacms.com/docs/config
然后对我的config.yml
文件进行了更改。最相关的变化如下
title: "Practice Nesta Site"
subtitle: "Nesta is pretty cool"
author:
name: Juan Gallardo
uri: nestademo1.herokuapp.com
email: jgallardo720@gmail.com
# cache
# Set it to true if you'd like Nesta to cache your pages in ./public.
# Useful if you're deploying Nesta with a proxy server such as Nginx,
# but not in the least bit helpful if your pages are dynamic, or you're
# deploying Nesta to Heroku.
#
cache: false
# content
# The root directory where nesta will look for your article files.
# Should contain "pages" and "attachments" subdirectories that contain
# your actual content and the (optional) menu.txt file that links to your
# main category pages.
#
content: content
# Overriding "cache" and "content" in production is recommended if you're
# deploying Nesta to your own server (but see the deployment documentation
# on the Nesta site). Setting google_analytics_code in production is
# recommended regardless of how you're deploying (if you have a GA account!).
#
# Don't forget to uncomment the "production:" line too...
production:
cache: false
content: /var/apps/nesta/shared/content
# google_analytics_code: "UA-???????-?"
read_more: See full page
此要点的完整档案
https://gist.github.com/JGallardo/6195651
我运行了heroku日志
jgallardo:demo-site juan.gallardo$ heroku logs
2013-08-09T17:22:21+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-09T17:23:35.001505+00:00 heroku[api]: Scale to web=1 by jgallardo720@gmail.com
2013-08-09T17:23:35.026933+00:00 heroku[api]: Deploy 953af2e by jgallardo720@gmail.com
2013-08-09T17:23:35.046866+00:00 heroku[api]: Release v3 created by jgallardo720@gmail.com
2013-08-09T17:23:35.085708+00:00 heroku[api]: Deploy 953af2e by jgallardo720@gmail.com
2013-08-09T17:23:35+00:00 heroku[slug-compiler]: Slug compilation finished
2013-08-09T17:23:39.139164+00:00 heroku[web.1]: Starting process with command
捆绑exec rackup config.ru -p 4751
2013-08-09T17:23:42.686255+00:00 app[web.1]: [2013-08-09 17:23:42] INFO WEBrick 1.3.1
2013-08-09T17:23:42.686255+00:00 app[web.1]: [2013-08-09 17:23:42] INFO ruby 2.0.0 (2013-06-27) [x86_64-linux]
2013-08-09T17:23:42.686477+00:00 app[web.1]: [2013-08-09 17:23:42] INFO WEBrick::HTTPServer#start: pid=2 port=4751
2013-08-09T17:23:43.030091+00:00 heroku[web.1]: State changed from starting to up
2013-08-09T17:36:17.229501+00:00 heroku[router]: at=info method=GET path=/ host=nestademo1.herokuapp.com fwd="98.173.1.66" dyno=web.1 connect=4ms service=51ms status=404 bytes=1570
2013-08-09T17:36:17.658553+00:00 heroku[router]: at=info method=GET path=/css/master.css host=nestademo1.herokuapp.com fwd="98.173.1.66" dyno=web.1 connect=4ms service=129ms status=200 bytes=5548
答案 0 :(得分:1)
这一行是问题所在:
content: /var/apps/nesta/shared/content
将其更改为:
content: content
确保将您的内容签入代码仓库。你可能已经找到了这个页面,对吗? http://nestacms.com/docs/deployment/heroku