loading...

Day 2: #100DaysofCode - I updated to Catalina and All HELL Broke Loose

sincerelybrittany profile image Brittany ・3 min read

#100DaysofCode (43 Part Series)

1) Day 1 of #100DaysofCode - Understanding Iterators 2) Day 2: #100DaysofCode - I updated to Catalina and All HELL Broke Loose 3 ... 41 3) Day 3: #100DaysofCode - Oh No, SQL 4) Day 4: #100DaysofCode - More Iterators 5) Day 5 - #100DaysofCode - Setting up a Sinatra App 6) Day 6 : #100DaysofCode - Setting up a Sinatra App : Part 2 - Config.ru 7) Day 7: #100DaysofCode - Setting up a Sinatra App - Part 3 8) Day 8: #100DaysofCode - Setting up Sinatra Database - Part 4 9) Day 9: #100DaysofCode - ActiveRecord and a Database 10) Day 10: #100DaysofCode - ActiveRecord and a Database 11) Day 11 : #100DaysofCode - RESTful Routes 12) Day 12: #100DaysofCode and Day 1 of #Javascript30 13) Day 13 - #100DaysofCode - #Javascript30 - Day 2 - CSS + JS Clock 14) Day 14: #100DaysofCode - Finalized my Sinatra Project -Security 15) #Day 15: #100DaysofCode - View my Sinatra Project 16) Day 16 - #100DaysofCode - Understanding MVC 17) Day 17 : #100DaysofCode - Knowing your Ruby Version & what Errno::EADDRINUSE means is important! 18) Day 18 of #100daysofCode - 3 challenges 19) Day 19 of #100daysofCode - Hashes 101 20) Day 20: #100DaysofCode - Practice makes perfect 21) Day 21 : #100DaysofCode - Cascading Style Sheets 101 22) Day 22 - #100daysofCode - CSS 101 Part 2 23) Day 23 - #100DaysofCode - Updated My Portfolio 24) Day 24 - #100DaysofCode - Practicing CSS Grid and Emmet Shortcuts on VSCode 25) Day 25 - #100DaysofCode - Intro to Rails 26) Day 26 - #100DaysofCode - Accessing Rails Commands 27) Day 27 : #100DaysofCode - Still reviewing the basic rails concepts . . . 28) Day 28 : #100DaysofCode - Adding Dev.to blogs to personal page 29) Day 29 : #100DaysofCode - Very Simple Rails App CRUD Practice 30) Day 30 : #100DaysofCode - Very basic rails continued 31) Day 31 - #100DaysofCode - Rails Routes 101 32) Day 32 : #100DaysofCode - Resources for learning to code 33) Day 33 - #100DaysofCode - Setting up my app on Heroku 34) Day 34 - #100DaysofCode - New/edit action versus create/update action 35) Day 35 : #100DaysofCode - A Code Challenge Completed 36) Day 36 - #100DaysofCode - Rails form_for versus form_tag 37) Day 37 : #100DaysofCode - 30 seconds of code 38) Day 38 - #100DaysofCode - Built my first basic rails application 39) Day 39 : #100DaysofCode - I updated my github profile page 40) Day 40 : #100DaysofCode - I need project ideas 41) Day 41 : #100DaysofCode - Collaboration 42) Day 42 : #100DaysofCode - The Planning of a Project 43) Day 43 : #100DaysofCode - The Amazing Faker Gem

So when I began my coding bootcamp I was directed to use the following directions to set up my environment locally.

Well, step one of the directions included installing Command Line Tools, but in order to install those tools I had to update my computer from OS X Mountain Lion to Catalina .

Who knew this minor update would cause HAVOC on my life. Before the update, I was able to access my desktop and documents from my Finder application without any issues, even though all of my files were technically in my iCloud directory. For some reason, it did not matter and I was content with it that way. But after the upgrade, I guess my system recalibrated and I could no longer access my documents the way I used to. I had to find a way to access my documents through iCloud.

There was one problem though, when I went into my terminal and typed ls I realized that iCloud was NOT an option!!! I wanted to cry. I did not have enough memory on my Mac to move all the documents back locally. So, I spent an entire weekend searching for solutions on how I can access my documents again. Then finally, I found an article on Stack Overflow

The solution was to create a link in my home directory to my iCloud drive and then create an alias to easy reference things within my iCloud. Sounded simple to me so I followed the Stack Overflow solution verbatim.

First, I created a link in my home directory to my iCloud drive by using the following code:

cd ~
ln -s ~/Library/Mobile\ Documents iCloud

I was then able to type the following to get inside of my iCloud directory through terminal

 cd ~/iCloud 

Then I created an alias so that I can reference the specific folder obtaining my code.

cd ~
ls -a
sudo nano .bash_profile

Entered my admin password.

Within the nano editor. I pressed esc to be able to edit, and using the keyboard, arrow key down to the bottom, I typed

alias i="cd ~/iCloud/com~apple~CloudDocs/Documents"

Then I pressed Ctrl + O to save, and then entered, then pressed Ctrl + X to exit.

Lastly, I typed alias i="cd ~/iCloud/com~apple~CloudDocs/Documents/" outside of the nano editor to set the alias variable.

Later on in the day I opened another terminal and pressed i and guess what, it did not work! (I shed a tear)

So, I had to check what I was doing wrong, I googled: "alias zsh: command not found: i .bash_profile"

And found yet another Stack Overflow solution.

According to Stack Overflow:
The default shell is bash shell on Mac OX. But if you have installed zsh, the default shell is zsh, when zsh shell starting, shell will find out the file named .zshrc, and execute the commands in .zshrc.

You can use echo $SHELL to see which shell bash is the default on your computer

With that in mind, I went to my terminal and ran the following code and, of course, I got the following:

-> echo $SHELL
/bin/zsh

so I followed the same steps as before but instead of putting the information inside of my bash_profile, I inserted into .zshrc
like so:

cd ~
ls -a
sudo nano .zshrc

Entered my admin password.

Within the nano editor. I pressed esc to be able to edit, and using the keyboard, arrow key down to the bottom, I typed

alias i="cd ~/iCloud/com~apple~CloudDocs/Documents"

Then I pressed Ctrl + O to save, and then entered, then pressed Ctrl + X to exit.

Now every time I press i in my terminal I am able to go straight into my iCloud documents directory. In addition, I added another alias called "code" that takes me directly to my directory that holds most of my code.

Although it was a stressful weekend trying to fix my computer, these kinds of "errors" help with learning new ways of doing things. I now know how to create an alias on my computer to refer to things easier, faster, and more efficiently. I hope this can help someone else too.

#100DaysofCode (43 Part Series)

1) Day 1 of #100DaysofCode - Understanding Iterators 2) Day 2: #100DaysofCode - I updated to Catalina and All HELL Broke Loose 3 ... 41 3) Day 3: #100DaysofCode - Oh No, SQL 4) Day 4: #100DaysofCode - More Iterators 5) Day 5 - #100DaysofCode - Setting up a Sinatra App 6) Day 6 : #100DaysofCode - Setting up a Sinatra App : Part 2 - Config.ru 7) Day 7: #100DaysofCode - Setting up a Sinatra App - Part 3 8) Day 8: #100DaysofCode - Setting up Sinatra Database - Part 4 9) Day 9: #100DaysofCode - ActiveRecord and a Database 10) Day 10: #100DaysofCode - ActiveRecord and a Database 11) Day 11 : #100DaysofCode - RESTful Routes 12) Day 12: #100DaysofCode and Day 1 of #Javascript30 13) Day 13 - #100DaysofCode - #Javascript30 - Day 2 - CSS + JS Clock 14) Day 14: #100DaysofCode - Finalized my Sinatra Project -Security 15) #Day 15: #100DaysofCode - View my Sinatra Project 16) Day 16 - #100DaysofCode - Understanding MVC 17) Day 17 : #100DaysofCode - Knowing your Ruby Version & what Errno::EADDRINUSE means is important! 18) Day 18 of #100daysofCode - 3 challenges 19) Day 19 of #100daysofCode - Hashes 101 20) Day 20: #100DaysofCode - Practice makes perfect 21) Day 21 : #100DaysofCode - Cascading Style Sheets 101 22) Day 22 - #100daysofCode - CSS 101 Part 2 23) Day 23 - #100DaysofCode - Updated My Portfolio 24) Day 24 - #100DaysofCode - Practicing CSS Grid and Emmet Shortcuts on VSCode 25) Day 25 - #100DaysofCode - Intro to Rails 26) Day 26 - #100DaysofCode - Accessing Rails Commands 27) Day 27 : #100DaysofCode - Still reviewing the basic rails concepts . . . 28) Day 28 : #100DaysofCode - Adding Dev.to blogs to personal page 29) Day 29 : #100DaysofCode - Very Simple Rails App CRUD Practice 30) Day 30 : #100DaysofCode - Very basic rails continued 31) Day 31 - #100DaysofCode - Rails Routes 101 32) Day 32 : #100DaysofCode - Resources for learning to code 33) Day 33 - #100DaysofCode - Setting up my app on Heroku 34) Day 34 - #100DaysofCode - New/edit action versus create/update action 35) Day 35 : #100DaysofCode - A Code Challenge Completed 36) Day 36 - #100DaysofCode - Rails form_for versus form_tag 37) Day 37 : #100DaysofCode - 30 seconds of code 38) Day 38 - #100DaysofCode - Built my first basic rails application 39) Day 39 : #100DaysofCode - I updated my github profile page 40) Day 40 : #100DaysofCode - I need project ideas 41) Day 41 : #100DaysofCode - Collaboration 42) Day 42 : #100DaysofCode - The Planning of a Project 43) Day 43 : #100DaysofCode - The Amazing Faker Gem

Posted on Jun 2 by:

sincerelybrittany profile

Brittany

@sincerelybrittany

Web Developer | Software Engineer πŸ‘©πŸΎβ€πŸ’» | Determined | Music & Dance | #100DaysofCode | #WomenWhoCode

Discussion

markdown guide