About a month ago I learned about Outreachy Internships from my Women in Web Dev group. An internship sounded really exciting! I’m building on my coding skills every day but what I really need is some experience working with others. Open Source is something I’ve wanted to do but wasn’t sure how to start; this opportunity was just the nudge I needed. I filled out my initial application and waited to hear back. On October 1st I received an email saying my application was accepted and it was time to start contributing!
I looked through all of the projects available – it was hard to narrow it down – and decided on PublicLab.org. I really love the reason behind the non-profit, science outreach is something I feel strongly about. Their list of requirements seemed to match well with what I know and I’ve been doing, so it seemed like a really good fit to me. I joined the chat and started looking through their GitHub repos. Their main repo is in Ruby, which I don’t have experience with, but Rails is set up very much the same as Laravel. I was excited to look at all the code structure and realize that it felt very familiar.
Getting started on this project was a very big challenge – bigger than I anticipated. I have not in the past had any issues setting up developing environments for Laravel or Python. Ruby on Rails, however… did not go well. I got it all installed with some trial and error but unfortunately the server simply wouldn’t run on my Windows machine. I tried using the Windows Subsystem for Linux, which sounded like the perfect solution: I would use Linux to run the server and have access to the full linux terminal, but I could do my developing in my Windows system. But the server still wouldn’t start. Googling the question “how to run Rails on Windows” generally returned the answer of: “don’t.”
I needed to dual-boot. Considering I’d just installed Ubuntu on a server for my other project I decided to stick with that. Partitioning my drive wasn’t hard; creating a live-boot usb of Ubuntu wasn’t hard; even booting up into the live-boot wasn’t hard! I started installing Ubuntu into my empty partition and expected I’d be done in about an hour. It didn’t go so well.
The first problem was that I couldn’t get back into Windows. I should have been able to update the boot record to see both options and just switch back and forth – that didn’t work. A lot of google searching and experimenting later I figured out that for some reason my Windows installation was using MBR, but Ubuntu was using GBT/EUFI. They didn’t play well together, I had to change one. I chose to update Windows to EUFI, which thankfully was easy with this guide. Unfortunately when updating the BIOS to EUFI I managed to break it and my computer wouldn’t boot – just a black screen. So my 7 year old got to help me open up my computer tower and help me reset the CMOS battery. 🙂 That fixed the BIOS and off I went to update the boot record in Ubuntu, now that it could see Windows on the drives. Seeing a dual-boot screen was delightful.
The second problem was far more frustrating: Ubuntu kept freezing. I would be able to install something, or log in and take a look around, or open up a program… and it would completely lock up. I had to hard reset every time, which makes me wince. Now this freezing created several bigger problems when it would freeze in the middle of installing something. I ended up with a bunch of errors and couldn’t really do much of anything before I’d have to restart. The couple of times it froze while I was updating the boot record trying to fix problem #1 had pretty bad results. I learned a lot about live-boot usbs and repairing boot sectors.
The problem was I didn’t have any idea why it was freezing. Was it because my motherboard is pretty old? Was there something wrong with the drive? Was there something wrong with the Ubuntu installation drive? I’m not familiar enough with Linux to do all kinds of system checking. One site said to upgrade the kernel to fix freezing problems but that seemed kind of risky for me to try. Then on one website I saw someone mention an issue with their graphic card drivers. That was worth a try, so I learned how to check my driver versions and update them from the generic to the nvidia versions. And just like that, like someone had waved a magic wand, the problem was fixed. Of course I didn’t know for sure if it had or not, I had to just stare at the screen while holding my breath for an increasing length of time. The longer it went without freezing the better I felt about my chances. At the end of the evening I was confident all was well!
So lesson learned, next time I install Ubuntu update the video drivers first.
After that I had no problems and could easily install Ruby and Rails and get the repo cloned and working. I did have to get my SSH keys set up again, installed Chrome, installed a text editor (I chose VSCode this time, vs Sublime I was using in Windows), and generally get things set up the way I like it. But so far it’s going really well. The best discovery was learning that I can access all of my Windows files from Ubuntu. That makes life a whole lot easier!
And the best part is now the Rails server will run!