Skip to content

Instantly share code, notes, and snippets.

@dprevite
Last active June 2, 2017 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dprevite/fa135c950bdc24acaf8a75a03a8107a2 to your computer and use it in GitHub Desktop.
Save dprevite/fa135c950bdc24acaf8a75a03a8107a2 to your computer and use it in GitHub Desktop.
new homestead mailcatcher

First, Install rbenv

  1. git clone https://github.com/rbenv/rbenv.git ~/.rbenv
  2. Add the following to your .bashrc or .zshrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
  1. Run source ~/.zshrc or source ~/.bashrc
  2. git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
  3. rbenv install -l Should list versions available to install
  4. rbenv install 2.3.1 && rbenv global 2.3.1
  5. ruby -v

Second, Install Mailcatcher

  1. sudo gem install mailcatcher
  2. vim /etc/systemd/system/mailcatcher.service
  3. Paste in:
[Unit]
Description=Ruby MailCatcher
Documentation=http://mailcatcher.me/

[Service]
# Ubuntu/Debian convention:
Type=simple
ExecStart=/home/vagrant/.rbenv/shims/mailcatcher --foreground --http-ip=192.168.10.18

[Install]
WantedBy=multi-user.target
  1. Run systemctl enable mailcatcher.service, enter password when asked
  2. Restart vagrant and try going to 192.168.10.18:1080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment