0

我添加了演示文件并在本地运行了该应用程序

本地运行的站点

但是当我部署到heroku时遇到了问题,内容没有显示

部署到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 logs

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 commandbundle 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

4

1 回答 1

1

这条线是问题所在:

content: /var/apps/nesta/shared/content

将其更改为:

content: content

并确保您的内容已签入代码仓库。你可能已经找到了这个页面,对吧?http://nestacms.com/docs/deployment/heroku

于 2013-08-12T09:44:15.217 回答