Heroku Fail: Doesn't Recognize Ghost Blog Assets - heroku

I've updated my blog to ghost-0.5.7, and am trying to get the creator theme to work. But I'm running into an error on Heroku that I don't know how to fix. I've already posted on the Ghost Blog forum, but the creators of the blog can't seem to help. Any thoughts? Here's the directory structure and the heroku log:
├── LICENSE
├── assets
│ ├── css
│ │ ├── foundation.css
│ │ ├── icons
│ │ │ ├── default
│ │ │ │ ├── default_logo_no_title_275x50.png
│ │ │ │ └── default_logo_no_title_275x50_2x.png
│ │ │ └── load
│ │ │ └── load.gif
│ │ ├── normalize.css
│ │ └── screen.css
│ ├── fonts
│ │ ├── icon-font.eot
│ │ ├── icon-font.svg
│ │ ├── icon-font.ttf
│ │ └── icon-font.woff
│ └── js
│ ├── index.js
│ └── jquery.fitvids.js
├── default.hbs
├── index.hbs
├── package.json
├── page.hbs
├── partials
│ ├── backfrompost.hbs
│ ├── header.hbs
│ └── pagination.hbs
└── post.hbs`
2014-12-23T07:25:46.863433+00:00 app[web.1]: ERROR: [default.hbs] The partial header could not be found
2014-12-23T07:25:46.863438+00:00 app[web.1]: Error: The partial header could not be found
2014-12-23T07:25:46.863440+00:00 app[web.1]: at new Error ()
2014-12-23T07:25:46.863441+00:00 app[web.1]: at Error.Exception (/app/node_modules/express-hbs/node_modules/handlebars/dist/cjs/handlebars/exception.js:13:41)
2014-12-23T07:25:46.863443+00:00 app[web.1]: at Object.invokePartial (/app/node_modules/express-hbs/node_modules/handlebars/dist/cjs/handlebars/runtime.js:179:11)
2014-12-23T07:25:46.863445+00:00 app[web.1]: at Object.invokePartialWrapper as invokePartial
2014-12-23T07:25:46.863436+00:00 app[web.1]: Ghost caught a processing error in the middleware layer.
2014-12-23T07:25:46.863427+00:00 app[web.1]:
2014-12-23T07:25:46.863447+00:00 app[web.1]: at Object.eval (eval at (/app/node_modules/express-hbs/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:171:23), :17:17)
2014-12-23T07:25:46.863434+00:00 app[web.1]: Rendering Error Page
2014-12-23T07:25:46.863449+00:00 app[web.1]: at ret (/app/node_modules/express-hbs/node_modules/handlebars/dist/cjs/handlebars/runtime.js:137:30)
2014-12-23T07:25:46.863451+00:00 app[web.1]: at ret (/app/node_modules/express-hbs/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:422:21)
2014-12-23T07:25:46.863470+00:00 app[web.1]: at renderTemplate (/app/node_modules/express-hbs/lib/hbs.js:385:13)
2014-12-23T07:25:46.863472+00:00 app[web.1]: at stackRenderer (/app/node_modules/express-hbs/lib/hbs.js:426:9)
2014-12-23T07:25:46.863473+00:00 app[web.1]: at Waiter.callback (/app/nodemodules/express-hbs/lib/hbs.js:405:7)

Not quite sure if this is a solution, but I realized that I think I may have had some old files/configuration/etc. lingering in my Heroku app from a previous push.
So, I decided to (1) git reset --hard, then (2) push the repo again. It's working now!

Related

Where store Tests (project structure - best practice)?

We have many different ways to implement project structure in GO.
My question is where the best way to store tests implementation:
separately (as Java Maven/Gradle standard)
├── pkg
│ ├── colocator
│ │ ├── some_impl.go
│ │ └── ...
│ ├── common
│ │ └── ...
│ └── dashboard
│ └── ...
├── test
│ │ └── internal
│ │ └── some_test_utils.go
│ ├── pkg
│ │ ├── colocator
│ │ │ ├── mocks
│ │ │ │ └── some_mock.go
│ │ │ └── some_impl_test.go
│ │ ├── ...
in place
├── pkg
│ ├── colocator
│ │ ├── mocks
│ │ │ └── some_mock.go
│ │ ├── some_impl.go
│ │ └── some_impl_test.go
etc...
?
Your second implementation is the 'correct' go way. Also you dont have to worry about those tests taking up space or something. The compiler ignores when you build the package.

Is there a way to generate static html pages with Microsoft.AspNet.WebApi.HelpPage?

Currently, thanks to Microsoft.AspNet.WebApi.HelpPage, I'm able to see API help page.
But I need to run (or publish and deploy to IIS) that ASP.NET Web application.
Does Microsoft.AspNet.WebApi.HelpPage provide any functionality to generate static API help html pages?
Not perfect solution, but using wget I was able to go through all help pages and save them all.
Example:
$ wget -r -k -E http://<ip_address>/Help/
$ tree
.
└── <ip_address>
├── Areas
│ └── HelpPage
│ └── HelpPage.css
├── Help
│ ├── Api
│ │ ├── DELETE-api-delivery-Data0-is
│ │ ├── DELETE-api-master-Data1-id
│ │ ├── DELETE-api-master-Data2-id
│ │ ├── DELETE-api-master-Data3-id
│ │ ├── DELETE-api-master-Data4-id
│ │ ├── DELETE-api-master-Data5-id
│ │ ├── GET-api-OtherApi1
│ │ ├── GET-api-OtherApi2
│ │ ├── GET-api-OtherApi3
│ │ └── GET-api-OtherApi4
│ ├── index.html
│ ├── ResourceModel#modelName=Data1
│ ├── ResourceModel#modelName=Data2
│ ├── ResourceModel#modelName=Data3
│ ├── ResourceModel#modelName=Data4
│ └── ResourceModel#modelName=Data5
└── Help.1

xpdf (pdftotext) with language pack call from different directory

I am experimenting with xpdf (pdftotext) on a macOS Terminal. I use one language package (Japanese). Everything works fine if I call the executable like this (from the lib directory):
lib kelly$ ./p2t -enc UTF-8 jp.pdf
and my data structure
files/lib/pdftotext
files/lib/xpdfrc
files/lib/jp.pdf #file to convert
files/options/Enc/jp/ # Here I have the language package files
and the following edited xpdfrc configuration file:
#----- begin Japanese support package (2011-sep-02)
cidToUnicode Adobe-Japan1 ../options/Enc/jp/Adobe-Japan1.cidToUnicode
unicodeMap ISO-2022-JP ../options/Enc/jp/ISO-2022-JP.unicodeMap
unicodeMap EUC-JP ../options/Enc/jp/EUC-JP.unicodeMap
unicodeMap Shift-JIS ../options/Enc/jp/Shift-JIS.unicodeMap
cMapDir Adobe-Japan1 ../options/Enc/jp/CMap
toUnicodeDir ../options/Enc/jp/CMap
#----- end Japanese support package
the problem I have is to call 'pdftoext' from a different directory, for example from 'files'. In this case, the files that the configuration files is pointing to are not seen.
files kelly$ ./lib/p2t -enc UTF-8 ./lib/jp.pdf
I get the following error:
Syntax Error: Unknown character collection 'Adobe-Japan1'
And the generated file is garbage.
Any idea on how the configuration file needs to be changed?
I was able to solve a similar problem.
I installed pdftotext with a brew cask.
The installation was done with the following command
$ brew cask install pdftotext
$ pdftotext -v
pdftotext version 3.03
Copyright 1996-2011 Glyph & Cog, LLC
and place the xpdfrc/language support packages in the following directory I did.
ls /usr/local/etc/xpdfrc
/usr/local/etc/xpdfrc
I downloaded the Japanese Language Pack from here.
https://www.xpdfreader.com/download.html
$ tree /usr/local/share/xpdf
/usr/local/share/xpdf
└── japanese
├── Adobe-Japan1.cidToUnicode
├── CMap
│ ├── 78-EUC-H
│ ├── 78-EUC-V
│ ├── 78-H
│ ├── 78-RKSJ-H
│ ├── 78-RKSJ-V
│ ├── 78-V
│ ├── 78ms-RKSJ-H
│ ├── 78ms-RKSJ-V
│ ├── 83pv-RKSJ-H
│ ├── 90ms-RKSJ-H
│ ├── 90ms-RKSJ-UCS2
│ ├── 90ms-RKSJ-V
│ ├── 90msp-RKSJ-H
│ ├── 90msp-RKSJ-V
│ ├── 90pv-RKSJ-H
│ ├── 90pv-RKSJ-UCS2
│ ├── 90pv-RKSJ-UCS2C
│ ├── 90pv-RKSJ-V
│ ├── Add-H
│ ├── Add-RKSJ-H
│ ├── Add-RKSJ-V
│ ├── Add-V
│ ├── Adobe-Japan1-0
│ ├── Adobe-Japan1-1
│ ├── Adobe-Japan1-2
│ ├── Adobe-Japan1-3
│ ├── Adobe-Japan1-4
│ ├── Adobe-Japan1-5
│ ├── Adobe-Japan1-6
│ ├── Adobe-Japan1-UCS2
│ ├── EUC-H
│ ├── EUC-V
│ ├── Ext-H
│ ├── Ext-RKSJ-H
│ ├── Ext-RKSJ-V
│ ├── Ext-V
│ ├── H
│ ├── Hankaku
│ ├── Hiragana
│ ├── Katakana
│ ├── NWP-H
│ ├── NWP-V
│ ├── RKSJ-H
│ ├── RKSJ-V
│ ├── Roman
│ ├── UniJIS-UCS2-H
│ ├── UniJIS-UCS2-HW-H
│ ├── UniJIS-UCS2-HW-V
│ ├── UniJIS-UCS2-V
│ ├── UniJIS-UTF16-H
│ ├── UniJIS-UTF16-V
│ ├── UniJIS-UTF32-H
│ ├── UniJIS-UTF32-V
│ ├── UniJIS-UTF8-H
│ ├── UniJIS-UTF8-V
│ ├── UniJIS2004-UTF16-H
│ ├── UniJIS2004-UTF16-V
│ ├── UniJIS2004-UTF32-H
│ ├── UniJIS2004-UTF32-V
│ ├── UniJIS2004-UTF8-H
│ ├── UniJIS2004-UTF8-V
│ ├── UniJISPro-UCS2-HW-V
│ ├── UniJISPro-UCS2-V
│ ├── UniJISPro-UTF8-V
│ ├── UniJISX0213-UTF32-H
│ ├── UniJISX0213-UTF32-V
│ ├── UniJISX02132004-UTF32-H
│ ├── UniJISX02132004-UTF32-V
│ ├── V
│ └── WP-Symbol
├── EUC-JP.unicodeMap
├── ISO-2022-JP.unicodeMap
├── README
├── Shift-JIS.unicodeMap
└── add-to-xpdfrc
2 directories, 76 files
The contents of xpdfrc are as follows
$ cat /usr/local/etc/xpdfrc
cidToUnicode Adobe-Japan1 /usr/local/share/xpdf/japanese/Adobe-Japan1.cidToUnicode
unicodeMap ISO-2022-JP /usr/local/share/xpdf/japanese/ISO-2022-JP.unicodeMap
unicodeMap EUC-JP /usr/local/share/xpdf/japanese/EUC-JP.unicodeMap
unicodeMap Shift-JIS /usr/local/share/xpdf/japanese/Shift-JIS.unicodeMap
cMapDir Adobe-Japan1 /usr/local/share/xpdf/japanese/CMap
toUnicodeDir /usr/local/share/xpdf/japanese/CMap

Using environment specific group/host_vars and mapping to var subdirectories in Ansible

I'm having issues finding good documentation for how to use environment specific (i.e. dev & test) group_vars and host_vars, then map down to subdirectories that are specific to large chunks of infrastructure (the wso2 directories).
Ideally, I should be able to say somewhere in my inventory or playbook dev or test and it should just route to dev or test then specify wso2 and have it look there.
.
├── group_vars
│ ├── dev
│ │ └── wso2
│ │ ├── apim-analytics.yml
│ │ ├── apim-is-as-km.yml
│ │ └── apim.yml
│ └── test
│ └── wso2
│ ├── apim-analytics.yml
│ ├── apim-is-as-km.yml
│ └── apim.yml
├── host_vars
│ ├── dev
│ │ └── wso2
│ │ ├── apim-analytics-dashboard_1.yml
│ │ ├── apim-analytics-worker_1.yml
│ │ ├── apim-gateway_1.yml
│ │ ├── apim-is-as-km_1.yml
│ │ ├── apim-km_1.yml
│ │ ├── apim-publisher_1.yml
│ │ ├── apim-store_1.yml
│ │ ├── apim-tm_1.yml
│ │ ├── wso2-apim-01.yml
│ │ └── wso2-apim-02.yml
│ └── test
│ └── wso2
│ ├── apim-analytics-dashboard_1.yml
│ ├── apim-analytics-worker_1.yml
│ ├── apim-gateway_1.yml
│ ├── apim-is-as-km_1.yml
│ ├── apim-km_1.yml
│ ├── apim-publisher_1.yml
│ ├── apim-store_1.yml
│ ├── apim-tm_1.yml
│ ├── wso2-apim-01.yml
│ └── wso2-apim-02.yml
There is great documentation about all other subjects around ansible... just not this, so any help is appreciated.
Thanks all :)

JBoss + Maven: Error building POM

I am trying to launch JBoss application server - my goal is to launch it and deploy some very simple project (I'm trying to do this with "helloworld" from the original quickstarts). The problem is that I have no experience with JBoss or Maven, so I'm having terrible time for a few days and it still isn't working. I presume, that the mistake is in Maven configuration, but I don't know, what I'm supposed to rewrite / replace to repair it.
This is the exact error:
[INFO] Error building POM (may not be this project's POM).
Project ID: org.jboss.component.management:jboss-dependency-management-all
Reason: POM 'org.jboss.component.management:jboss-dependency-management-all' not found in repository: Unable to download the artifact from any repository
org.jboss.component.management:jboss-dependency-management-all:pom:6.0.1-redhat-1
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.jboss.component.management:jboss-dependency-management-all
I was trying to follow instructions given at http://www.jboss.org/quickstarts/eap/#build-and-deploy-th%20e-quickstarts , so my only configuration of Maven was, that I copied settings.xml from quickstart directory to .m2 directory.Finally I tried to build and deploy quickstart by command "mvn clean install jboss-as:deploy", but it caused the error :-(
How to repair this mistake?
P.s.: I use Ubuntu 14.04.
This is how the structure of my folder with JBoss looks like:
.
├── InstallationLog.txt
├── InstallSummary.html
├── jboss-eap-6.2
│ ├── appclient
│ ├── bin
│ ├── bundles
│ ├── docs
│ ├── domain
│ ├── icons
│ ├── JBossEULA.txt
│ ├── jboss-modules.jar
│ ├── LICENSE.txt
│ ├── modules
│ ├── standalone
│ ├── version.txt
│ └── welcome-content
├── jboss-eap-6.2.0.GA-quickstarts
│ ├── bean-validation
│ ├── bmt
│ ├── cdi-alternative
│ ├── cdi-decorator
│ ├── cdi-injection
│ ├── cdi-interceptors
│ ├── cdi-portable-extension
│ ├── cdi-stereotype
│ ├── cdi-veto
│ ├── cluster-ha-singleton
│ ├── cmt
│ ├── configure-postgresql.cli
│ ├── CONTRIBUTING.html
│ ├── CONTRIBUTING.md
│ ├── contributor-settings.xml
│ ├── dist
│ ├── ejb-asynchronous
│ ├── ejb-in-ear
│ ├── ejb-in-war
│ ├── ejb-multi-server
│ ├── ejb-remote
│ ├── ejb-security
│ ├── ejb-security-interceptors
│ ├── ejb-throws-exception
│ ├── ejb-timer
│ ├── forge-from-scratch
│ ├── greeter
│ ├── guide
│ ├── helloworld
│ ├── helloworld-jms
│ ├── helloworld-mbean
│ ├── helloworld-mdb
│ ├── helloworld-osgi
│ ├── helloworld-rs
│ ├── helloworld-singleton
│ ├── helloworld-ws
│ ├── hibernate3
│ ├── hibernate4
│ ├── hornetq-clustering
│ ├── h2-console
│ ├── inter-app
│ ├── jax-rs-client
│ ├── jta-crash-rec
│ ├── jts
│ ├── jts-distributed-crash-rec
│ ├── kitchensink
│ ├── kitchensink-ear
│ ├── kitchensink-jsp
│ ├── kitchensink-ml
│ ├── kitchensink-ml-ear
│ ├── LICENSE.txt
│ ├── logging
│ ├── logging-tools
│ ├── log4j
│ ├── mail
│ ├── numberguess
│ ├── payment-cdi-event
│ ├── picketlink-sts
│ ├── pom.xml
│ ├── README.html
│ ├── README.md
│ ├── RELEASE_PROCEDURE.html
│ ├── RELEASE_PROCEDURE.md
│ ├── remove-postgresql.cli
│ ├── servlet-async
│ ├── servlet-filterlistener
│ ├── servlet-security
│ ├── settings.xml
│ ├── shopping-cart
│ ├── tasks
│ ├── tasks-jsf
│ ├── tasks-rs
│ ├── temperature-converter
│ ├── template
│ ├── wicket-ear
│ ├── wicket-war
│ ├── wsat-simple
│ ├── wsba-coordinator-completion-simple
│ ├── wsba-participant-completion-simple
│ ├── xml-dom4j
│ └── xml-jaxp
└── Uninstaller
└── uninstaller.jar
settings.xml: http://hostcode.sourceforge.net/view/1926
pom.xml: http://hostcode.sourceforge.net/view/1927
Eventually I've solved this - thorough delete of all Maven files ( or files which held some deprecated info about Maven ) and installation of its newest version was the key :-)
This solution is written for Ubuntu 14.04 LTS (but it should work in other versions and even other Debian-based systems too).
STEP-BY-STEP SOLUTION:
1) Completely uninstall Maven
sudo apt-get purge maven
2) Uninstall libaether package
sudo apt-get purge libaether-java
3) Uninstall libplexus packages
sudo apt-get purge libplexus-*
4) Finally, install actual Maven version from the repository
sudo apt-get install maven

Resources