Today has been a long day in training patience. Solving bugs can be exhilarating - high fiving yourself for finding a solution to a tricky problem is awesome, but in your desperation for that moment of victory, don’t jump the gun. Training myself to not implement a solution before I really understand what I’m doing has been difficult, because I naturally just want to get through a roadblock so I can keep going. However, similar to “measure twice, cut once” in building - slowing down, taking a deep breath, double checking your logs, and not just trying the first idea the internet can save you countless hours of headaches because you made a premature move.

I had added multiple pages and was humming along on my personal site when I went to push live, and ran into this after trying to get it up to heroku:

remote:        /tmp/build_db1a7d9b4d8e919b6a0a87c750f0eeae/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
remote:        /tmp/build_db1a7d9b4d8e919b6a0a87c750f0eeae/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.4/lib/rake/sprocketstask.rb:146:in `with_logger'
remote:        /tmp/build_db1a7d9b4d8e919b6a0a87c750f0eeae/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
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: 
remote: Verifying deploy....
remote: 
remote: !	Push rejected to mkwaters-personal.

Wait, what? It failed? Let me see that again. I dug in a little farther up, to where the error actually began in the logs.

remote:        I, [2015-09-06T18:58:30.264029 #401]  INFO -- : Writing /tmp/build_db1a7d9b4d8e919b6a0a87c750f0eeae/public/assets/application-4ea5b8333b2006c2324fd02028d32e49.j
remote:        rake aborted!

The first few plunges into Google told me things like “Delete your Gemfile.lock and try pushing,” or “Check that all the files are in the appropriate places.”

But deleting a file always feels a little drastic to me. So I returned again to the logs. I finally realized that I had been missing a call in git status, it wasn’t standing out because the vagrant terminal we use for The Firehose Project doesn’t color code like your normal terminal does, and in my rush to get my work up, I was missing it.

I was getting the error while compiling the assets, and the last file being compiled was named application… I wasn’t pushing up that I had “deleted” application.css (renamed as application.css.scss) and so the compiling was failing because heroku was still looking for the original application file. I deleted it, sent it to git and then pushed, and voila! It worked.