1

After a while looking for similar issues I couldn't find a solution. Most of them is for "only Ruby and Heroku" type of error.

But here I'm using AngularJS to import all my css and js files (including Bootstrap). The thing is, I cannot visualize my glyphicons on Heroku when locally works like a charm.

I tried in production.rb

config.assets.compile = true

Also to precompile my assets and pushing:

$ rake assets:precompile RAILS_ENV=production

Didn't work.

What else can I do?

My application.css

 *= require bootstrap/dist/css/bootstrap
 *= require_tree .
 *= require_self
 *= require angular-material/angular-material
 *= require font-awesome/css/font-awesome
 *= require bootstrap-social/bootstrap-social
 *= require bootstrap-datepicker3

Thank you.

Ezequiel Ramiro
  • 760
  • 1
  • 12
  • 29

1 Answers1

1

I had similar issue with icons in the past days. Could you post 2 images, one visualizing you Chrome/Mozilla Developer Console focusing on the css and html of that icon not visualized. This should be done for production and development. Basically my problem was in the asset pipeline. 1. The asset-url method did not work ... 2. The icons were based on a separate CSS Stylesheet. This CSS stylesheet was imported with @import from a stylesheet in the asset pipeline. Anyway you will notice the difference. Post the image, it may help.

What I am trying to say is, that you should focus on the difference between the fingerprinted application-fingerprint.css file from production and the one in development. It may be that you are not loading the css in development from the application.css, but from other file, then that file is not available in production.

Additionally I do not use require_tree

You can read my post at the following link and there are many post about the asset pipeline on stackoverflow, but is better to just interact and comment me so that i can try to help you.

Javascript does not work from a bootstrap template in rails

Rails 5 problems with multiple manifest files

Community
  • 1
  • 1
Fabrizio Bertoglio
  • 5,890
  • 4
  • 16
  • 57
  • 1
    Hey man, I dug up a bit more and I could find the solution following this post: http://stackoverflow.com/questions/28694224/heroku-actioncontrollerroutingerror-no-route-matches-get-fonts-glyphicon – Ezequiel Ramiro Mar 13 '17 at 15:05
  • @EzequielRamiro I am glad that you could find a solution, I will read it as I it will be very helpful in the future. Thanks Fabrizio – Fabrizio Bertoglio Mar 13 '17 at 15:09