Skip to content

Setting Up Your Development Laptop

To streamline our project development, debugging, and overall experience, we adhere to a consistent laptop setup process. This ensures a standardized environment, enabling us to provide better support and reduce potential configuration conflicts.

  1. Databases on macOS: We generally prefer using Homebrew for database installations, such as MySQL and PostgreSQL, over native OSX installers.

  2. Git Commit Tools: While we primarily use the command line for Git commits, we’re open to exploring GUI tools. If you’ve got suggestions that might enhance our process, please share!

  • Web Browsers: Install Chrome and Firefox for testing and development.
  • 1Password: A reliable password management system.
  • VS Code: Our team’s preferred editor.
  • Slack for Mac: Our primary communication tool.
  • Harvest: Makes time tracking convenient.
  • iTerm2: Offers enhanced customization over the default Terminal.
  • Zoom: Our go-to for video chats with clients and team members.
  1. Git Configuration: Set your Planet Argon email for Git.

    Terminal window
    git config --global user.email "your.email@planetargon.com"
  2. Shell Customization: Switch to Zsh/oh-my-zsh, a shell created by Planet Argon founder and CEO Robby Russell (he’d greatly appreciate it if you gave it a try!).

    Terminal window
    curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
  3. M1 Macbook Compilation Flags: If you’re on an M1 Macbook, set the following flags:

    Terminal window
    export LDFLAGS="-L/opt/homebrew/opt/libffi/lib"
    export CPPFLAGS="-I/opt/homebrew/opt/libffi/include"
    export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig"
    export ARCHFLAGS="-arch x86_64"
    export PATH="/opt/homebrew/opt/mysql@5.7/bin:$PATH"
    export PATH="/opt/homebrew/opt/postgresql@10/bin:$PATH"
  4. Homebrew Installation: Homebrew is our preferred package manager. Install it and follow the prompt to also install Xcode’s command line tools.

    Terminal window
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh"
  5. Ruby Version Management: Install rbenv and ruby-build. This helps us maintain different Ruby versions across projects.

    Terminal window
    brew install rbenv ruby-build

    Note: Avoid rvm since it conflicts with rbenv. If you need to install Ruby versions older than 2.3, please refer to the openssl installation instructions.

    • Make sure to add these lines within your .zshrc
      echo -n 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
      echo -n 'eval "$(rbenv init -)"' >> ~/.zshrc
    • Run omz reload to apply these changes
  6. Database Servers Configuration:

    • MySQL: Install and set it to launch at startup.

      Terminal window
      brew install mysql@5.7
      brew services start mysql@5.7
    • PostgreSQL: Similarly, install and configure PostgreSQL.

      Terminal window
      brew install postgres
      brew services start postgresql
    • XQuartz/X11: This is needed for capybara-webkit dependencies. After installation, add ‘/usr/X11/bin’ to your path. If there are issues on Mojave, seek assistance.

  7. SSH Key Configuration: Generate an SSH key using this guide. Share your key with a teammate to add it to our Github repository. This is essential for deployment access.

  8. Gravatar Setup: Use your Planet Argon email to create a Gravatar by following this link.

  9. Email Notifications: Check your Gmail for invitations and instructions to set up accounts on:

    • Slack
    • Harvest
    • Atlassian (Confluence/JIRA)
    • Bugsnag
    • Bitbucket
    • Github
    • Code Climate, Heroku, EngineYard, and CircleCI, as required.

    Full-time employees also get access to 1Password, Know Your Team, and Grasshopper.

  10. Project Setup:

  • Create a main dev directory for all projects.

  • Inside dev, make a databases sub-directory.

  • For existing projects, use git clone in the dev directory.

  • After cloning, install project-specific gems using:

    Terminal window
    bundle install --path vendor
  • Once the associated gems are installed, copy keys, secrets, and other credentials from the 1Password vault for that project into the .env / .yml files.

    If you feel like the vault is missing information, check the Slack channel for that particular project to see if additional credentials are located there.

  1. Completion: Once you’re able to run the server, view sample data, and execute the test suite, you’re all set. Congratulations! 🎉
I'm experiencing bunder/setup errors!

If you experience bundler/setup errors when trying to run a project, try adding the following to your ~/.powconfig with your username instead of ‘yourusername’. The same solution can also help for Ruby version errors.

Terminal window
export PATH="/Users/yourusername/.rbenv/shims:/Users/yourusername/.rbenv/bin:$PATH"
I'm experiencing mysql2 errors when trying to install gems!

If you experience mysql2 errors when trying to install associated gems, try running:

Terminal window
bundle config --local build.mysql2 "--with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"

or

Terminal window
gem install mysql2 -- --with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include

or

Terminal window
gem install mysql2 -v '0.5.3' -- --with-opt-dir=$(brew --prefix openssl) --with-ldflags=-L/opt/homebrew/Cellar/zstd/1.5.1/lib

If mysql2 errors persist, make sure that mysql@5.7 is installed and started by running:

Terminal window
$ brew services list

If it is not installed, install it with:

Terminal window
$ brew install mysql@5.7

If it is installed and is stopped, start it by running:

Terminal window
$ brew services start mysql@5.7

Another conflict may arise if the current version of mysql is running. If it is listed as started in the brew services list, you can stop it by running:

Terminal window
$ brew services stop mysql

If you’re running into errors about sockets, you may also need to uninstall mysql (the non 5.7 version) completely. Ask another dev for help if you find yourself down this rabbit hole.

I'm experiencing segmentation faults on my m1 Macbook during app setup!

These are often found with rspec tests or any calls to Enum#next. You may need to update your ruby version to 2.7.3.

I'm getting an error that zsh can't find an application!

If zsh returns an error that it can’t find an application, make sure it’s installed and linked:

Terminal window
brew install {app_name}
brew link {app_name} --force
I'm experiencing something not on this list. Help!

If you have any other questions/weird errors while setting up a project, check out the Team Members x Client Projects grid to find another developer who is familiar with the project to get some help.