mardi 1 septembre 2015

Rails 3.2.18 application assets not displaying properly on Heroku

Ive been given a rails 3.2 app and heroku "server" to work on and deploy to.

I have deployed the application to heroku, and it is being served, but the website is all mumbled up and not displaying css/js properly. From experience it seems that the assets have not been precompiled.

Below is what I have tried so far to get this to work.

  1. I ran RAILS_ENV=production rake assets:precompile on my local, committed the changes, and pushed to heroku. Page was still not rendering properly.

  2. I ran rake assets:clean to remove public/assets. Then deployed to heroku, and watched them be precompiled on the deploy. This still resulted in the site not displaying properly.

  3. Started playing with my production.rb file

    config.cache_classes = true

    config.consider_all_requests_local = false

    config.action_controller.perform_caching = true

    config.serve_static_assets = false

    config.assets.compress = true

    config.assets.compile = false

    config.assets.digest = true

    config.assets.precompile += %w( ie-html5shiv-printshiv.js ie-selectivizr.min.js )

this still has resulted in my site not displaying correctly.

Im at odds end, not sure what else to try. Any other tips or pointers?

Aucun commentaire:

Enregistrer un commentaire