Closed ChaikaPrime closed 10 years ago
Sounds like an Asset pipeline issue. Check your precompiled assets and where are you serving them from?
Regards, Ameen.
On Thu, Feb 20, 2014 at 4:22 PM, ChaikaPrime notifications@github.comwrote:
I intend to deploy Selfstarter on Heroku by simly following the instructions.
The app was successfully uploaded, but when I open it I see that the layout of the website is broken and only text is rendered. What could be the issue? Thanks
Reply to this email directly or view it on GitHubhttps://github.com/lockitron/selfstarter/issues/81 .
Hi Ameen, Thank you for your reply, it gave me some idea what to look for.
It seems I solved the problem: Firstly, I forgot to include rails_12factor gem as stated in Heroku manual: https://devcenter.heroku.com/articles/rails-asset-pipeline It solved the problem with the layout.
Secondly, I followed: http://stackoverflow.com/questions/18324063/rails-4-images-not-loading-on-heroku And modified production.rb to have: config.serve_static_assets = true config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' config.assets.compile = true
The only problem is that I do not have enough experience to understand what it actually means...
UPDATE: The video button does not work though...
config.serve_static_assets = true
Absolutely needed. The default Rails production.rb assumes Apache or Nginx serves assets. The easiest way to diagnose this being false
(off) is to view source, click on any .js or .css and get a 404 not found.config.assets.compile = true
won't help / won't hurt. Heroku precompiles most static assets during the git push
. Most other things like views (templates) are served by Rails on-the-fly.config.action_dispatch.x_sendfile_header
on Heroku should be nil
https://devcenter.heroku.com/articles/rack-sendfile Thank you very much for your help!
I intend to deploy Selfstarter on Heroku by simly following the instructions.
The app was successfully uploaded, but when I open it I see that the layout of the website is broken and only text is rendered. What could be the issue? Thanks