2017/05 - When turning it off and on again actually works

I had a funny experience when creaitng this blog that expanded my narrow-mindedness when dealing with software. Back on April Fools day (Yes I'm serious) I was trying to fix a bug with this blogsite's JavaScript, specifically the JS used when navigating between the main page sections (About, Education, etc). It was pretty much simply not working in production, despite working fine locally. This only started happening when I tried to remove Turbolinks from the application.js file because it was causing issues when returning to the main page from a blog post by stopping the JS from running once you returned form there.

So I remove Turbolinks from the application JS file and my JavaScript stops working completely. Okay, no problem, we've all been here before, just putting it back in and rebooting everything should get me back to where I was before. Even if it didn't I could always just shut down the server and clone my repo again if it came to that. So I put it back in and the problem persists. "Strange" I think, since this doesn't even make sense. I try the standard Rails "Magic-commands-that-fix-everything-even-though-theyprobably-shouldn't" like cleaning and precompiling assets, reinstalling gems, and so forth. But nothing makes a difference. I end up removing the blog entirely from the server and cloning the repo, my trump card, and surprise surprise this bug manages to survive even that!

At this point I'm completely stumped and thinking that I should turn the entire server off and on again. I persist and continue to screw around with things I don't even understand, haphazardly adding stack overflow fixes in here and there since I was at my wits end. I eventually try cloning it again and, god knows why, it worked.

If I had to take a guess at why this happened, I'd IMAGINE that it's because some of the bootstrap functionality is simply linked to in my application.html.erb file. And since this server has no SSL cert at this moment in time, I can see them rejecting it (At least temporarily) until some merciful soul in power somewhere took a look at this logsite and said "Ah he doesn't look like trouble, leave him off...".

In any case, this took up so much of my free time that I figured I'd get a blog post out of it.

Lesson learned: Turning it off and on again once is sometimes not enough.