title: Mac Terminal can't run most commands after restarting it
body: <p>I am using a mac. I have a customised terminal <code>zsh</code>, and it was fine for a while. But after I restarted my computer, it started to behave differently:</p>
  
  <ul>
  <li>The terminal stopped running commands such as <code>rake</code> or <code>rails</code>. </li>
  <li><p>I have already created applications using rails, but using a rails command like <code>rails -v</code> now gives me this:</p>
  
  <pre><code>Rails is not currently installed on this system. To get the latest version, simply type:
  </code></pre></li>
  <li><p>The terminal used to display a tilde <code>~</code> instead of my username and that has also stopped. It now displays the full username:</p>
  
  <pre><code>Gustaves-MacBook-Air% $ sudo gem install rails
  </code></pre></li>
  </ul>
  
  <p>I have no idea why it doesn't work, and why restarting the computer would break it, even though I've done it before.</p>
  
  <p>I can't even re-download rails:</p>
  
  <pre><code>$ sudo gem install rails
  zsh: command not found: $
  </code></pre>
  
  <p>because I have customised my terminal long ago following an online setup.</p>