Question

I added the demo files and ran the app just fine locally

site running locally

But I ran into problems when i deployed to heroku, the content was not showing

deployed to heroku

I read through the documentation on the official site for nesta at http://nestacms.com/docs/deployment/heroku But they pretty much just make a comment rather than offering instruction

Make sure that you fill in config/config.yml properly (the most important thing is to ensure that caching is off, as we can’t write to Heroku’s file system).

Well I followed their documentation elsewhere http://nestacms.com/docs/config

And then made changes to my config.yml file. Most relevant changes below

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

Full file at this gist
https://gist.github.com/JGallardo/6195651

I ran 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

Was it helpful?

Solution

This line is the problem:

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

Change it to this:

content: content

And make sure that your content is checked into the code repo. You've probably found this page already, right? http://nestacms.com/docs/deployment/heroku

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top