user2536065
user2536065

Reputation:

How do you access assets in a Pakyow app on heroku?

Problem: Pakyow App deployed to Heroku and all JS and CSS sourced/linked in template head 404.

I assume this is a problem stemming from Heroku, but rather not one that I am aware of. As far as I know, Heroku allows static assets in the public directory.

Anyway, looking for some helpful pointers from Pakyow users.

The app (currently) is at http://pakyow-go.herokuapp.com and the repo can be found at http://github.com/jphager2/pakyow-go.

Upvotes: 0

Views: 40

Answers (1)

bryanp
bryanp

Reputation: 437

This is an unfortunate default config option in the currently released version. To get around it, add this to the production configuration block in app.rb:

app.static = true

The reason it works this way out of the box is in most production cases you don't want the app serving static files. This would instead be the responsibility of the HTTP server. On Heroku though, you want the app server to serve static files unless you host them from a CDN.

Upvotes: 0

Related Questions