ruby on rails - CSS and JS not showing up in my HEAD when deployed to heroku -
i have deployed project heroku after of changes pushed github. worked fine except noticed new css updated did not go through. css files committed , pushed github, know not problem.
when viewing source on heroku app, notice missing of .css , .js files in head section. there reason head different on heroku on local. running smoothly , didn't change config files since last push heroku...
thanks.
here link github project: https://github.com/michaelnavarro/careerfoundry
application.js:
// manifest file that'll compiled application.js, include files // listed below. // // javascript/coffee file within directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can referenced here using relative path. // // it's not advisable add code directly here, if do, it'll appear @ bottom of // compiled file. // // read sprockets readme (https://github.com/sstephenson/sprockets#sprockets-directives) details // supported directives. // //= require jquery //= require jquery_ujs //= require bootstrap //= require turbolinks //= require_tree .
application.css
/* * manifest file that'll compiled application.css, include files * listed below. * * css , scss file within directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can referenced here using relative path. * * you're free add application-wide styles file , they'll appear @ top of * compiled file, it's better create new file per style scope. *= require_self *= require_tree . */ /* */
you should precompile assets:
rails_env=production bundle exec rake assets:precompile
then add files git
git add . git commit -m "compiled assests"
then push heroku. heroku's asset compiler finicky , doesn't work time. should locally , push heroku.
Comments
Post a Comment