
Sinatra cms build, and rebuild, and rebuild
- Select a language for the TTS:
- UK English Female
- UK English Male
- US English Female
- US English Male
- Australian Female
- Australian Male
- Language selected: (auto detect) - EN
Play all audios:
Building an MVC Sinatra app was a lot of fun. I decided to make a recipe tracker called Snack Overflow. I wrapped it in Bootstrap with modern card layouts and a welcoming logo. I used
ActiveRecord and sessions to handle user accounts, and I validated the uniqueness of user login attributes. Through this project, I have a much deeper understanding of object-relational
management and the attention to detail needed to complete this task and others like it. Although stressful at times, building this app brought me closer to technical nuances that are vital
for producing web apps. Thinking about how the user should interact with a product could be very different from how they use it. With the user in mind, I tried to map out the best ways for
interactivity to be smooth and straightforward. For the final submission, I had to create a whole new repo (or at least I thought I did at the time). Allow me to explain. While applying the
finishing touches, I decided that it would be cool to deploy the app using Heroku. I can say, without a doubt, this was the second most stressed I’ve been during this whole project. The
first, finding out my original app couldn’t be completed without using an external database. I wanted users to be able to upload photos, and that was not part of the plan. After knuckling
down and pivoting from my original build, I finally got to a place where I was ready to submit. Exploring Heroku proved to be a more involved escapade than I intended it to be. First, my
gems needed evaluating. Sqlite3 had to be replaced with PostgreSQL because Heroku doesn’t support it, and applying add-ons to allow a Sinatra app to be deployable turn out to be a nightmare.
I created another repo in an attempt to get my app back to where I started before I veered off on a deployment tangent. But there was something else holding me back from running my code and
powering it up with Shotgun server. There were issues with the gems again, and after I fixed that there was an issue with not being able to find “user.id 13”. user.id 13 was an admin user
account I created to manage and view all the users who signed up and logged in. I spent two hours on troubleshooting this issue when I decided to make another repo. So, I started from
scratch again. Shortly after I created the third and final repo, I discovered that user.id 13 was still logged in. Its session was still running. Once I figured this out, I dropped the
users’ table and started with a fresh database. At this phase, I’m in no way proclaiming to be a mastermind of code (although I aspire to be). And sometimes roadblocks can set you back a few
steps if you don’t think things through enough. But all is well. I hope you enjoyed this read. This post is just a little insight into what I’ve been doing. In everything you do, remember
to keep your head up, keep your heart strong, and keep your mind set.