{"id":557,"date":"2020-08-26T16:39:53","date_gmt":"2020-08-26T16:39:53","guid":{"rendered":"http:\/\/sherryumlah.com\/home\/?page_id=557"},"modified":"2020-10-09T16:49:49","modified_gmt":"2020-10-09T16:49:49","slug":"setting-up-a-new-mac-for-ror-development","status":"publish","type":"page","link":"http:\/\/sherryumlah.com\/home\/setting-up-a-new-mac-for-ror-development\/","title":{"rendered":"Setting Up a New Mac for RoR Development"},"content":{"rendered":"<h2>Install Homebrew<\/h2>\n<p><a href=\"https:\/\/brew.sh\/\">Homebrew<\/a> is a package manager for MacOS.<\/p>\n<ol>\n<li>Open the Mac terminal and enter this at the command prompt:<br \/>\n<em>&gt; \/bin\/bash -c &#8220;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install.sh)&#8221;<\/em><\/li>\n<li>Run <em>&gt; brew update<\/em> to make sure it&#8217;s the most recent version of Homebrew<\/li>\n<li>Run <em>&gt; brew doctor<\/em> to make sure your system is ready to brew<\/li>\n<\/ol>\n<h2>Setting up\u00a0a default IDE (VS Code) for the Mac Terminal<\/h2>\n<ol>\n<li><a href=\"https:\/\/code.visualstudio.com\/download\">Download VS Code<\/a>\u00a0and install it.<\/li>\n<li>Within the Mac terminal, navigate to \/Users\/yourUserName and at the command prompt enter <strong>&gt; touch\u00a0.bash_profile<\/strong> to create a .bash_profile file<\/li>\n<li>Open the .bash_profile file by entering &gt; open bash_profile<\/li>\n<li>Add the following line to your .bash_profile file and save it:\u00a0 <em>export EDITOR=&#8221;code -w&#8221;<\/em><\/li>\n<li>Open VS Code and press <strong>Command + shift + p<\/strong> to open the command palette. Within the command palette type\u00a0type\u00a0<em>code<\/em>\u00a0and click\u00a0<strong>Shell Command: Install &#8216;code&#8217; command in PATH<\/strong>.<\/li>\n<li>Within the terminal, at the command prompt enter this to refresh and use the latest version of your bash_profile file:<br \/>\n<em>&gt; source .bash_profile<\/em><\/li>\n<li>Now you can edit any file by prefacing it with <em>&gt; code.\u00a0 <\/em>Example:<em> &gt; code yourFilename\u00a0 OR\u00a0 &gt; code . <\/em>(to open the current directory)<\/li>\n<\/ol>\n<h2>Use Homebrew to Install Ruby<\/h2>\n<ol>\n<li>At the Mac terminal command prompt, enter:<br \/>\n&gt; brew install ruby<br \/>\nThis will install ruby.\u00a0 You may see a message such as:<br \/>\n<em>By default, binaries installed by gem will be placed into:\u00a0 \/usr\/local\/lib\/ruby\/gems\/2.7.0\/bin<\/em><\/li>\n<li>Opent your bash_profile file in VS Code to edit it:<br \/>\n<em>&gt; code ~\/.bash_profile<\/em><\/li>\n<li>Update the ~\/.bash_profile file to have this line appear first in the file and then save it:\n<div><em>export PATH=\/usr\/local\/opt\/ruby\/bin:$PATH<br \/>\n<\/em><\/div>\n<\/li>\n<li>Refresh the ~\/.bash_profile file by entering:<br \/>\n&gt; source ~\/.bash_profile<\/li>\n<\/ol>\n<h2>Install\u00a0Rails<\/h2>\n<ol>\n<li>At the Mac terminal prompt enter:<br \/>\n&gt;\u00a0gem install Rails<\/li>\n<\/ol>\n<h2>Installing Node and Yarn<\/h2>\n<p>You might need Node.js and Yarn installed to manage your application&#8217;s JavaScript.\u00a0 (npm &#8212; node package manager &#8212; will be installed with Node). At the Mac terminal prompt, run:<br \/>\n<em>&gt;\u00a0brew <span class=\"token function\">install<\/span> node<\/em><\/p>\n<p>Verify the installation worked by running a check on the version of Node installed:<br \/>\n<em><span class=\"s1\">&gt; node &#8211;version<\/span><\/em><\/p>\n<p>Install Yarn by running:<\/p>\n<p><em>&gt; brew install yarn<\/em><\/p>\n<p>Verify the installation worked by running a check on the version of\u00a0Yarn installed:<br \/>\n<em><span class=\"s1\">&gt;\u00a0yarn -v<\/span><\/em><\/p>\n<p>&nbsp;<\/p>\n<h2>Jazz Up the ZSH Terminal<\/h2>\n<p>https:\/\/www.freecodecamp.org\/news\/jazz-up-your-zsh-terminal-in-seven-steps-a-visual-guide-e81a8fd59a38\/<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install Homebrew Homebrew is a package manager for MacOS. Open the Mac terminal and enter this at the command prompt: &gt; \/bin\/bash -c &#8220;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install.sh)&#8221; Run &gt; brew update to make sure it&#8217;s the most recent version of Homebrew Run &gt; brew doctor to make sure your system is ready to brew Setting up\u00a0a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"class_list":["post-557","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/sherryumlah.com\/home\/wp-json\/wp\/v2\/pages\/557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/sherryumlah.com\/home\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/sherryumlah.com\/home\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/sherryumlah.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/sherryumlah.com\/home\/wp-json\/wp\/v2\/comments?post=557"}],"version-history":[{"count":3,"href":"http:\/\/sherryumlah.com\/home\/wp-json\/wp\/v2\/pages\/557\/revisions"}],"predecessor-version":[{"id":570,"href":"http:\/\/sherryumlah.com\/home\/wp-json\/wp\/v2\/pages\/557\/revisions\/570"}],"wp:attachment":[{"href":"http:\/\/sherryumlah.com\/home\/wp-json\/wp\/v2\/media?parent=557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}