Rails Notes – Database named ‘logs’
So, as I’ve been playing with Ruby on Rails (henceforth RoR or just rails), I have come across some issues which seem to be interesting, not obvious, and all together well documented. First and foremost :Don’t name a database ‘logs’ and expect things to work! It took me a few hours trying to decode what scaffold was really doing when it gave the error akin to “no method ‘count’ for logs controller.” Best I can understand, [Ll]og[s]? is a reserved term of sorts within rails and should not be messed with. I changed the database name, recreated the model and controller and it all worked like magic. So, in order for others to avoid such issues, I’m posting this on the web for all to see!