Now, granted, I'm a complete newbie to Rails, so I'm sure to make every mistake possible. But, wow, Heroku has been a complete pain in the ass!
First, I'm discovering that Heroku doesn't believe in error messages. They simply state:
- "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly."
Second, Git is a newbie nightmare! Seriously! All I wanted to do was back up 5 commits! How hard should that be? I wanted everything I had done in those 5 commits to be UNDONE. Isn't that the point of a versioning system? Yeah, well, if there's a way to do this, then please let me know. After searching all over the web and trying a number of "solutions", I ended up starting the tutorial over from scratch. (Write one line of code, git commit, git push, git push heroku, test/verify.) All the TDD that RSpec uses is great, and all the local testing passed with flying colours! Then, upload to Heroku and watch it fail!
So, now I'm trying to figure out what exactly is the cause. I'm completely baffled, but so pissed off that I won't give it up. Maybe I'll post more here as I go.
For those of you who are curious, here are my Heroku failures to-date (all of which yielded the exact same error screen described above):
- If you use an undeclared variable.
e.g. <%= link_to "Home" home_path %> # Better specify home_path!!! - Use coffee-rails.
I'm still trouble-shooting this one, so I'll have to post more later. - No, coffee-rails, which I think serves my JavaScript, isn't the problem. The problem is that my "assets" aren't "precompiled". Yeah. In the olden days, compilers were for C, and so I guess I have much to learn.
- Am currently going through my "heroku log" files, after reading about them here. I chose to use the following to get the last 200 lines into a local log file:
- heroku logs -n 200 > log/heroku.log
This is where I discovered the "precompiled assets" issue. How to solve this one? I will wait and look for that tomorrow... or maybe Monday...
Note: Yes, it took until Monday, and I finally found my solution! Why this wasn't more obvious, I'll never know. See Jeppe Liisberg's solution.