Three months into the program and I have created my third project here at flatiron. During the course of the project, I built a complete Ruby on Rails application with RESTful routes. As for my dataset to manage, I decided to create a space picture explorer application similar to Instagram or Pinterest. My inspiration for this project originated from the many space documentaries I have watched while being stuck at home.
Overall Rails made the backend of this project simple. I worked through the models, controllers, migrations, and routes within the first few days; using Rails generators, which I still do not trust. But on another note, I did like the convenience of just typing Rails g whatever and getting a good setup to build off of. Along with this the routes and link_to helper in rails were a godsend. I just plain do not like writing HTML, so anytime I could generate it, I did. Now on what I came here to talk about, my ISSUES with Heroku and Ubuntu.
So as I was finishing my project I noticed others in my cohort had somehow connected their project to the internet and did not have to use localhost to get to their project!!! So naturally, I became envious and decided I will do that no matter the cost. To get the whole picture of this I will explain how I felt starting out. At the beginning of this process, I was hopeful, curious, and determined. Now after days of reconfiguring my system just to get it to work with Heroku, I am proud that I figured out the error in my system.
The problem I ran into was I made my original project with SQLite3 as the database and Heroku needs PostgreSQL. Naturally, I believe this to be an easy fix so I set off renaming my database in bliss. However, everything I did in my terminal to use PostgreSQL would not work. After scouring the web and scrounging through my ubuntu system I realized my initial setup of ubuntu had gone horribly wrong and needed to be redone.
Thus as you may have inferred the only fix was restructuring my local environment. After running through this process twice because of another error, I finally got PostgreSQL to run on my system. But then my computer decided that this was not enough, and unmounted my ubuntu Wsl from my system and would not tell me what it did. I googled and googled the three various errors I was getting with rake, git, and rails. After some time I finally found the solution on some Chinese forum. While I do not know exactly what the forum said I knew the code would remount my Wsl to my C: drive which fixed all my issues.
After this, I finally had an application on Heroku. Was it worth it? Yes. Did I learn anything? Yes, I now know my ubuntu subsystem much better than my own computer. So the moral to this story is envy often leads us down a hole that you will not soon leave, but Rails makes creating ruby web applications simple.