Coursera Rails Week 1 Notes
I wrote earlier about how I am taking a series on Rails Development with Coursera. Below are some of my notes from the course:
Installing Rails on OS X
I had RVM installed in the past, but my experience with CircleCI, conversations with eric, and the instructions in the course told me to use something else. So I blew away RVM and replaced it with rbenv. When it came time to install rails, I was getting an error around nokogiriwhich is strikingly similar to a lot of the issues that we see when updating OS X images. I am not 100% sure what the root cause of this error is, but the fix is to run the following commandxcode-select --install
this will magically fix everything and rails will install. Apparently this has something to do with when you install newer versions of Xcode, some underlying libraries become sad and running that command fixes it. Yay Apple.
Handy Bash Profile
During the installation videos the instructor shows how to work with bash profile. I stole a couple things from his profile that he did not cover that would have saved me hours over the course of my life so far.- Make the prompt show less info My current bash prompt is super long because my laptop name is
Levs-MacBook-Pro-2:
, if you set the following variable it will just show you your username:# Change the way Prompt Shows Up export PS1="\n[\u \W]$ "
- Make aliases for
ls and ls -al
These aliases are super handy. The first one shows you which files are directories, symbolic links, or regular files in color. The second one allows you to list all the details about files by simply typingll
instead ofls -al'
.# Aliases alias ls='ls -G' alias ll='ls -al'
Sublime Text Tips and Tricks
Like many MOOCs these days, this course recommends using Sublime Text. I don't disagree, its a great editor. I bought a license two years ago but have not used it in quite some time. I like it because its super lightweight, has a relatively small learning curve, and is fast. This is especially evident when working with large text files that would cause the latest stream of Electron based editors (like Atom, VS Code, Light Table) to beachball or crash. I decided to give it another shot and follow along in this course. I learned a couple of things I did not know.- If you double click on a search result it will take you to the file, holy crap that would have saved me a ton of time in the past.
- Go to Anything with
Command + P
, I have heard about this but never used it. Wow. Just Wow.
Git
This course had a great overview of Git including a nice historical overview and differences between git (Distributed System) and Centralized Systems like CVS and Subversion. This course also allowed me to discover that Pro Git is available for free as an ebook. This is an excellent resource and I am so grateful that Scott Chacon and Ben Straub released the eBook under a CC license.GitHub
My mind has been blown. If you go to any GitHub repo and type in "T" it starts a fuzzy search of that repo. I have been using GitHub for three years and did not know about this feature. This just goes to show you, that even if you are an "expert" at something, it can be really valuable to step back into the shoes of a beginner. I did not expect to learn much from this first module, but I was sorely mistaken.Thank you for reading! Share your thoughts with me on mastodon or via email.
Check out some more stuff to read down below.
Most popular posts this month
- Daggerversary
- Setting up ANTLR4 on Windows
- SQLite DB Migrations with PRAGMA user_version
- My Custom Miniflux CSS Theme
- Installing Nextcloud on a FreeBSD VPS
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- "Let's pick the right product for you". from jwz
- Automattic is doing open source dirty from David Heinemeier Hansson
- Setting Up Mastodon Author Tags from Robb Knight • Posts • Atom Feed
- Getting my next SWE role from Emmanuel Blogs
- Methods of Mandarin from Isaak.net
- 12 Months of Mandarin from Isaak.net
- Villages Without Cars from Straphanger
- Some Go web dev notes from Julia Evans
Articles from blogs I follow around the net
TCP Server in Zig - Part 4 - Multithreading
We finished Part 1 with a simple single-threaded server, which we could describe as: Create our socket Bind it to an address Put it in "server" mode (i.e. call listen on it) Accept a connection Application logic involving reading/writing to t…
via openmymind.net October 11, 2024Nebraska Woman Files Suit Against All Homosexuals
A Nebraska woman identifying herself as the "ambassador" for plaintiffs "God and His Son, Jesus Christ," is suing all homosexuals on Earth for breaking "religious and moral laws". In the suit, entered into the docket as Driskell v. …
via jwz October 10, 2024Pluralistic: Cars bricked by bankrupt EV company will stay bricked (10 Oct 2024)
Today's links Cars bricked by bankrupt EV company will stay bricked: "Software-based car" is a warning, not a slogan. Hey look at this: Delights to delectate. This day in history: 2009, 2014, 2019, 2023 Upcoming appearances: Where to find me. …
via Pluralistic: Daily links from Cory Doctorow October 10, 2024Generated by openring