-3

So i made this ruby on rails (rails 4) application with a lot of assets, images and css stylesheets, and pushed it onto heroku at first and it did push successfully but when i tried to run it my images all had a question mark so i did search up on this and came up with a solution where I had to change the configuration/production file's "config.assets.compile" from false to true and deployed it again and it worked no problem.

Then for my second iteration of the project I added bootstrap support into many of my css files and tried to deploy to heroku and i run into this

remote:        /tmp/build_d1ed400bad4dd39eea2ab72184854c0e/vendor/bundle/ruby/2.2.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
remote:        Tasks: TOP => assets:precompile
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 

Ive researched a lot on this and some of the methods to fix this have been depreciated but this one particular solution where it says to precompile the assets locally using

 RAILS_ENV=production bundle exec rake assets:precompile

did successfully run locally and it create files under the public directory but when I deploy it to heroku it still precompiles the assets. So my question is: Is there a way to let heroku know that there are assets precompiled and there is no need to run that command again? or is there a better way to solve this?

Prgrmrfx
  • 29
  • 2
  • Hey Nihas. This question is not a very good one for a number of reasons. First, be sure to post an error log specifying exactly what your deploy failed error is. Otherwise know one will know how to help. Second, post some things that you've tried so the community knows what you've already done and then we can troubleshoot. – Dan Rubio Jun 28 '16 at 18:14
  • @DanRubio Hey thanks for the suggestion, i have updated the question :) – Prgrmrfx Jun 30 '16 at 04:03

1 Answers1

0

The question is very broad, but give this a whirl and let me know if it works..

go into your config/environments/production file and look for

config.assets.compile = false

turn that to

config.assets.compile = true

I've had something similar happen after installing bootstrap and that was the fix.

Shawn Wilson
  • 1,311
  • 14
  • 40
  • Hey thanks for the help. Yea i already have that value set to true. I did update the question and hopefully made it narrower :) – Prgrmrfx Jun 30 '16 at 04:04
  • ok, its a long shot, is the app in full blown production with active users? if not, When I had this issue, I ended up blowing out the entire app right off heroku and redeployed and it fixed it. Heroku has been acting a bit "Wonkey" lately.. im looking at AWS or Digital Ocean currently as an alternative. – Shawn Wilson Jun 30 '16 at 04:20