Rails Stylesheets on Heroku -


on local machine, when view rails app, stylesheets linked @ /assets/stylesheets/ on heroku, changed /stylesheets/ presumably in public directory , not work! how stylesheets move public/stylesheets on compilation?

edit:

file directory after rake assets:precompile

app   assets     stylesheets       application.css       application.min.css       home.css       home.css.scss       home.min.css       scaffolds.css       scaffolds.css.scss       scaffolds.min.css       startups.css       startups.css.scss public   assets     application-3701cb84bbc3c20d5a7ec1aac608fbdb.js     application-3701cb84bbc3c20d5a7ec1aac608fbdb.js.gz     application-f7ff7ad51f3528ccca1b5c7f2d5b5915.css     application-f7ff7ad51f3528ccca1b5c7f2d5b5915.css.gz     manifest-ad3babc6c84cc0b38f1a98eb594b8235.json     rails-afd7b40a0142ed24738b640e78388de4.png 

here stylesheet link in application.html.haml:

stylesheet_link_tag "flat-ui", "home.min", media: "all" 

gem flatui-rails in gemfile , *= require flat-ui in application.css file.

edit 2:

cleared public/assets folder, added public/assets/* .gitignore , pushed heroku repo. during slug compilation heroku ran asset pipline , made /assets/application-b2c82b0573602f3a368a26f36b99542b.css linked in source code of site, styles don't load , the page looking doesn't exist. when try navigate style sheet... what?

here's application.html.haml:

!!! 5 %html   %head     %title startupcrawler     = stylesheet_link_tag "application", media: "all"     = csrf_meta_tags   = yield 

michael, before push heroku try:

rake assets:precompile

this precompile them in public folder can served heroku. let me know if didn't work.

also, make sure following line exists in config/environments/production.rb

config.serve_static_assets = true 

then of course

git push heroku master


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -