Skip to content

Workstation Setup for Ruby

Ayodeji Jayeoba edited this page Feb 27, 2015 · 10 revisions

TODO: Automate this, via...

Manual setup (i.e. without sprout-wrap)

SSH Key Generation

  • ssh-keygen -t rsa # with no passphrase. Creates keypair in ~/.ssh

Homebrew Setup

  • Install homebrew
  • Run brew doctor periodically and fix any warnings

Homebrew Libs (TODO: flesh this out...)

  • postgres
  • watch
  • git (?)
  • Others???

Git setup

  • Use SSH keys (TODO: details)
  • Add proper global git config (TODO: anything else?)
    • git config --global push.default current
    • git config --global user.name Your Name
    • git config --global user.email you@example.com

Ruby Setup

  • Install ruby-install via homebrew: brew install ruby-install
  • Use ruby-install to install needed version of ruby (whatever is in PROJECT_ROOT/.ruby-version): ruby-install ruby 2.1.4
  • Install chruby via homebrew: brew install chruby
    • Configure chruby (see Configuration and Auto Switching sections in chruby docs to add lines to .bashrc)

RubyMine Setup

  • Install RubyMine
  • Turn on Autoscroll to/from source (gear at top of Project tool window)
  • Ensure your project .gitignore ignores .idea folder
  • Globally ignore .idea folder:
    • Run git config --global core.excludesfile ~/.gitignore_global
    • Create a .gitignore_global file in your home directory and add .idea.
    • Save the file and run git status to see it's ignored.
    • git add ., git commit -m "message" and git push from your project folder.

Sprout-wrap setup (work in progress)

Installing Yosemite from scratch

Create a Bootable USB Flash Drive

  • Plug in your USB drive into the computer and open Disk Utility (in Applications).
  • Select the USB drive from the left sidebar and click on Erase tab.
  • Choose Mac OS Extended (Journaled) in the format box and let the name be Untitled (default).
  • Now click on Erase button and wait until the format process completes.
  • Then choose Partition tab and select 1 Partition from Partition Layout dropdown menu. Click on Option and ensure GUID Partition Table is selected as the partition scheme, with its name set to Untitled.
  • After downloading the OS X 10.10 Yosemite installer from the Mac App Store, just quit the installer.
  • Launch the Terminal app (in Applications/Utilities) and type or paste the following command in, and then hit Enter:
$ sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ Yosemite.app
  • This will create the bootable USB flash drive. This takes between 10-20 minutes. Do not interrupt the Terminal or eject the flash drive during the process. Once the process completes, you will see the message "Copy Complete. Done."

Clean Install OS X Yosemite on Your Mac

  • Ensure the bootable USB flash drive is plugged into your Mac and restart the computer. As soon as the start-up chime plays, press the Option key (Alt).
  • Choose the USB drive on the start-up drive selection screen and hit Enter/Return on the keyboard.
  • Wait until the Yosemite installer appears on screen. This could take a few seconds or minutes.
  • Click on Disk Utility and then hit Continue.
  • Click on Macintosh HD from the left hand-side pane and then hit Erase tab on the top-right portion of the window. Leave all the settings at their default values and then hit Erase button at the bottom right. This will wipe all files stored on your startup hard drive.
  • When the erasing process is complete, return to the first screen where you selected Disk Utility. Now click on Install OS X and then hit Continue.
  • Choose the Macintosh HD partition you erased and then click Install.
  • If you have followed all the steps correctly, your computer should now boot right into the newly installed operating system, OS X Yosemite, and you could cherish its stunning new UI.

Running Sprout-wrap on a fresh Yosemite

  • Visit the Sprout-wrap github page https://github.com/pivotal-sprout/sprout-wrap and follow the instructions there or simply do:
    • Open the terminal and install command line tools

      ```
      $ xcode-select --install
      ```
      
    • Clone the sprout-wrap project and navigate into the folder

      ```
      $ clone https://github.com/pivotal-sprout/sprout-wrap.git
      $ cd sprout-wrap
      ```
      
    • Install soloist & and other required gems

      ```
      $ sudo gem install bundler
      $ sudo bundle
      ```
      
    • Run soloist - at this point you may want to grab a cup of coffee and visit the bahamas. Soloist can take from 10 minutes to 2 hours to complete ☕ 😆

      ```
      $ bundle exec soloist
      ```
      

etc...